@grok/agent-sdk 0.5.0 → 0.7.0
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.
- package/AGENTS.md +40 -0
- package/dist/channels/github/forward.d.ts +5 -0
- package/dist/channels/github/forward.d.ts.map +1 -1
- package/dist/channels/github/forward.js +6 -3
- package/dist/channels/slack/api.d.ts +18 -0
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +31 -0
- package/dist/channels/slack/approvals.d.ts +19 -2
- package/dist/channels/slack/approvals.d.ts.map +1 -1
- package/dist/channels/slack/approvals.js +90 -19
- package/dist/channels/slack/attachments.d.ts +7 -2
- package/dist/channels/slack/attachments.d.ts.map +1 -1
- package/dist/channels/slack/attachments.js +318 -156
- package/dist/channels/slack/connect-card.d.ts +16 -0
- package/dist/channels/slack/connect-card.d.ts.map +1 -0
- package/dist/channels/slack/connect-card.js +31 -0
- package/dist/channels/slack/credentials.d.ts +10 -2
- package/dist/channels/slack/credentials.d.ts.map +1 -1
- package/dist/channels/slack/credentials.js +17 -15
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +18 -9
- package/dist/channels/slack/dispatch.d.ts +1 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +19 -3
- package/dist/channels/slack/inbound.d.ts +8 -2
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +25 -4
- package/dist/channels/slack/index.d.ts +3 -2
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +3 -2
- package/dist/channels/slack/init.d.ts.map +1 -1
- package/dist/channels/slack/init.js +2 -1
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +2 -15
- package/dist/channels/slack/mentions.d.ts +28 -0
- package/dist/channels/slack/mentions.d.ts.map +1 -0
- package/dist/channels/slack/mentions.js +178 -0
- package/dist/channels/slack/setup.js +1 -1
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +46 -3
- package/dist/channels/slack/stop.d.ts.map +1 -1
- package/dist/channels/slack/stop.js +7 -1
- package/dist/channels/slack/thread-context.d.ts +3 -0
- package/dist/channels/slack/thread-context.d.ts.map +1 -1
- package/dist/channels/slack/thread-context.js +17 -7
- package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
- package/dist/channels/slack/tool-approval-events.js +55 -2
- package/dist/channels/slack/types.d.ts +2 -0
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/channels/teams/activity.d.ts +33 -0
- package/dist/channels/teams/activity.d.ts.map +1 -0
- package/dist/channels/teams/activity.js +213 -0
- package/dist/channels/teams/auth.d.ts +25 -0
- package/dist/channels/teams/auth.d.ts.map +1 -0
- package/dist/channels/teams/auth.js +55 -0
- package/dist/channels/teams/bot-framework-auth.d.ts +33 -0
- package/dist/channels/teams/bot-framework-auth.d.ts.map +1 -0
- package/dist/channels/teams/bot-framework-auth.js +154 -0
- package/dist/channels/teams/cards.d.ts +23 -0
- package/dist/channels/teams/cards.d.ts.map +1 -0
- package/dist/channels/teams/cards.js +107 -0
- package/dist/channels/teams/connector.d.ts +48 -0
- package/dist/channels/teams/connector.d.ts.map +1 -0
- package/dist/channels/teams/connector.js +159 -0
- package/dist/channels/teams/credentials.d.ts +65 -0
- package/dist/channels/teams/credentials.d.ts.map +1 -0
- package/dist/channels/teams/credentials.js +84 -0
- package/dist/channels/teams/delivery.d.ts +14 -0
- package/dist/channels/teams/delivery.d.ts.map +1 -0
- package/dist/channels/teams/delivery.js +169 -0
- package/dist/channels/teams/dispatch.d.ts +45 -0
- package/dist/channels/teams/dispatch.d.ts.map +1 -0
- package/dist/channels/teams/dispatch.js +402 -0
- package/dist/channels/teams/engagement.d.ts +32 -0
- package/dist/channels/teams/engagement.d.ts.map +1 -0
- package/dist/channels/teams/engagement.js +120 -0
- package/dist/channels/teams/index.d.ts +21 -0
- package/dist/channels/teams/index.d.ts.map +1 -0
- package/dist/channels/teams/index.js +19 -0
- package/dist/channels/teams/marks.d.ts +19 -0
- package/dist/channels/teams/marks.d.ts.map +1 -0
- package/dist/channels/teams/marks.js +96 -0
- package/dist/channels/teams/senders.d.ts +27 -0
- package/dist/channels/teams/senders.d.ts.map +1 -0
- package/dist/channels/teams/senders.js +72 -0
- package/dist/channels/teams/teams-channel.d.ts +43 -0
- package/dist/channels/teams/teams-channel.d.ts.map +1 -0
- package/dist/channels/teams/teams-channel.js +278 -0
- package/dist/channels/teams/text.d.ts +7 -0
- package/dist/channels/teams/text.d.ts.map +1 -0
- package/dist/channels/teams/text.js +63 -0
- package/dist/channels/teams/types.d.ts +306 -0
- package/dist/channels/teams/types.d.ts.map +1 -0
- package/dist/channels/teams/types.js +1 -0
- package/dist/channels.d.ts +31 -0
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +37 -0
- package/dist/connections.d.ts +1 -1
- package/dist/connections.d.ts.map +1 -1
- package/dist/docs/404.html +3 -3
- package/dist/docs/assets/{app.CYdjweqP.js → app.Ch-048af.js} +4 -4
- package/dist/docs/assets/changelog.md.SoN0MK7o.js +1 -0
- package/dist/docs/assets/{changelog.md.BMrJ5WxW.lean.js → changelog.md.SoN0MK7o.lean.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BdYoBKxY.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CRATKS9J.js → VPLocalSearchBox.D7BIa9Su.js} +2 -2
- package/dist/docs/assets/chunks/{arc.BxM78ISR.js → arc.BIzu7OVF.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.Bi6MuKaU.js → architectureDiagram-Q4EWVU46.DNznI0Sn.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.L47qqpDG.js → baseUniq.B4y6Y5eG.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.kHFF2FK5.js → blockDiagram-DXYQGD6D.BudnBsgw.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BTW85ll3.js → c4Diagram-AHTNJAMY._bB00GdB.js} +1 -1
- package/dist/docs/assets/chunks/channel.CgxlmuBS.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.Bbh3_48g.js → chunk-4BX2VUAB.CRftnUwS.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.WeAmK3fK.js → chunk-4TB4RGXK.CSx1x2Ob.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.DTdUiVHf.js → chunk-55IACEB6.KkLHAAbH.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.n5XzANDz.js → chunk-EDXVE4YY.DDeKCCtX.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.D51eewCb.js → chunk-FMBD7UC4.DrLlsD9m.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.BrY0U7ZV.js → chunk-OYMX7WX6.DeVYOGcT.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.B0OA4aFV.js → chunk-QZHKN3VN.Cz4_bS6p.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.Djt3Mjft.js → chunk-YZCP3GAM.CwrYtDVo.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DWroREP-.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DWroREP-.js +1 -0
- package/dist/docs/assets/chunks/clone.F824-PNx.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.DiMcA6Q8.js → cose-bilkent-S5V4N54A.3d8hflz6.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.BGqI4vrS.js → dagre-KV5264BT.BVEgjiPg.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.bDqFuMoH.js → diagram-5BDNPKRD.j7dZpUK_.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Y0sxaXRU.js → diagram-G4DWMVQ6.4flIgIon.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.Bg43b0yi.js → diagram-MMDJMWI5.BlJiFh-S.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.DCfVasEC.js → diagram-TYMM5635.DHAOHEyM.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.C72GaD16.js → erDiagram-SMLLAGMA.DkmyG7xK.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.DxRQj7pP.js → flowDiagram-DWJPFMVM.L_WiaAU6.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.DiLZy5Q4.js → ganttDiagram-T4ZO3ILL.CT6kOI2a.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.DL8XkRvh.js → gitGraphDiagram-UUTBAWPF.D8CRlLqh.js} +1 -1
- package/dist/docs/assets/chunks/{graph.3Xub80xJ.js → graph.CdOyJvsX.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.O3lGaspu.js → infoDiagram-42DDH7IO.DcmXeSos.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.w-pCiQzn.js → ishikawaDiagram-UXIWVN3A.BBjY4mxr.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.Cg_oBs9j.js → journeyDiagram-VCZTEJTY.BrXteAB6.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.BpfMGPwn.js → kanban-definition-6JOO6SKY.OlHsUJVV.js} +1 -1
- package/dist/docs/assets/chunks/{layout.CtwXs__p.js → layout.DDwvoQlY.js} +1 -1
- package/dist/docs/assets/chunks/{linear.NmCskOrP.js → linear.BRXPDWj3.js} +1 -1
- package/dist/docs/assets/chunks/{min.DpQtsLKs.js → min.3YwC0t3o.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.B-P-aKVp.js → mindmap-definition-QFDTVHPH.mPHnT2lN.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.BfjjqK7j.js → pieDiagram-DEJITSTG.DEK2--em.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.BTzHo53F.js → quadrantDiagram-34T5L4WZ.NCdRAOzK.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.DIT2FIKr.js → requirementDiagram-MS252O5E.DLAocFWZ.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.NK1wCsgt.js → sankeyDiagram-XADWPNL6.afIOqpyT.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.D9oElkvo.js → sequenceDiagram-FGHM5R23.DXBjvkkE.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.IPksnixH.js → stateDiagram-FHFEXIEX.B_SGgvgs.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.OKAy5Bz7.js +1 -0
- package/dist/docs/assets/chunks/{theme.CgKu7tr3.js → theme.bNyH5NPA.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.CuAtJapY.js → timeline-definition-GMOUNBTQ.CE6S1iSb.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.B87nNW9E.js → vennDiagram-DHZGUBPP.Blk7wb8V.js} +1 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.DQqE3WF8.js +162 -0
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.BELjSq8w.js → wardleyDiagram-NUSXRM2D.MUEQyRnz.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.5zN5ZGsz.js → xychartDiagram-5P7HB3ND.DnJA2aXp.js} +1 -1
- package/dist/docs/assets/{deployment.md.DJtuDVLh.js → deployment.md.N9S5KC5R.js} +2 -2
- package/dist/docs/assets/{deployment.md.DJtuDVLh.lean.js → deployment.md.N9S5KC5R.lean.js} +1 -1
- package/dist/docs/assets/guides_cloud-agents.md.BdWqmUGb.js +14 -0
- package/dist/docs/assets/{guides_cloud-agents.md.CiXAW6on.lean.js → guides_cloud-agents.md.BdWqmUGb.lean.js} +1 -1
- package/dist/docs/assets/guides_teams.md.7Lz2sbqB.js +50 -0
- package/dist/docs/assets/guides_teams.md.7Lz2sbqB.lean.js +1 -0
- package/dist/docs/assets/{reference_channels.md.CPWOpdsC.js → reference_channels.md.CRvqgU0n.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.DHm6DmYk.js → reference_cli.md.NS6U5a-7.js} +14 -4
- package/dist/docs/assets/{reference_cli.md.DHm6DmYk.lean.js → reference_cli.md.NS6U5a-7.lean.js} +1 -1
- package/dist/docs/assets/{reference_limits.md.CbdtFr4T.js → reference_limits.md.CW9PTdxr.js} +3 -3
- package/dist/docs/assets/{reference_limits.md.CbdtFr4T.lean.js → reference_limits.md.CW9PTdxr.lean.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.RhQ9ZLo1.js → reference_schedules.md.Dd8_d0WG.js} +3 -3
- package/dist/docs/assets/{reference_sessions.md.NXVQt9mP.js → reference_sessions.md.CoCyQLEz.js} +2 -2
- package/dist/docs/assets/{reference_sessions.md.NXVQt9mP.lean.js → reference_sessions.md.CoCyQLEz.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.DzCPNPkG.js → reference_skills.md.SFRZDC41.js} +4 -4
- package/dist/docs/assets/{reference_skills.md.DzCPNPkG.lean.js → reference_skills.md.SFRZDC41.lean.js} +1 -1
- package/dist/docs/assets/{style.DK0YX1WL.css → style.B7zPxANR.css} +1 -1
- package/dist/docs/assets/troubleshooting.md.CsQTleto.js +3 -0
- package/dist/docs/assets/{troubleshooting.md.DfKKvW1R.lean.js → troubleshooting.md.CsQTleto.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +37 -37
- package/dist/docs/changelog.html +37 -37
- package/dist/docs/changelog.md +51 -0
- package/dist/docs/deployment.html +39 -39
- package/dist/docs/deployment.md +10 -0
- package/dist/docs/evals.html +37 -37
- package/dist/docs/guides/agent-to-agent.html +37 -37
- package/dist/docs/guides/bitbucket.html +37 -37
- package/dist/docs/guides/cloud-agents.html +43 -38
- package/dist/docs/guides/cloud-agents.md +47 -0
- package/dist/docs/guides/convert-automation.html +37 -37
- package/dist/docs/guides/github.html +37 -37
- package/dist/docs/guides/gitlab.html +37 -37
- package/dist/docs/guides/improve.html +37 -37
- package/dist/docs/guides/jev.html +37 -37
- package/dist/docs/guides/mcp-oauth.html +37 -37
- package/dist/docs/guides/migrate.html +37 -37
- package/dist/docs/guides/opentelemetry.html +37 -37
- package/dist/docs/guides/pagerduty.html +37 -37
- package/dist/docs/guides/slack.html +37 -37
- package/dist/docs/guides/teams.html +109 -0
- package/dist/docs/guides/teams.md +384 -0
- package/dist/docs/guides/webhooks.html +37 -37
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +37 -37
- package/dist/docs/index.html +37 -37
- package/dist/docs/llms-full.txt +652 -4
- package/dist/docs/llms.txt +1 -0
- package/dist/docs/quickstart.html +37 -37
- package/dist/docs/reference/access.html +36 -36
- package/dist/docs/reference/agent-config.html +37 -37
- package/dist/docs/reference/artifacts.html +37 -37
- package/dist/docs/reference/channels.html +38 -38
- package/dist/docs/reference/channels.md +1 -0
- package/dist/docs/reference/cli.html +50 -40
- package/dist/docs/reference/cli.md +116 -0
- package/dist/docs/reference/connections.html +37 -37
- package/dist/docs/reference/evals.html +37 -37
- package/dist/docs/reference/extensions.html +37 -37
- package/dist/docs/reference/hooks.html +37 -37
- package/dist/docs/reference/http-api.html +37 -37
- package/dist/docs/reference/instructions.html +37 -37
- package/dist/docs/reference/limits.html +39 -39
- package/dist/docs/reference/limits.md +4 -4
- package/dist/docs/reference/memory.html +37 -37
- package/dist/docs/reference/playground.html +36 -36
- package/dist/docs/reference/project-layout.html +37 -37
- package/dist/docs/reference/schedules.html +40 -40
- package/dist/docs/reference/sessions.html +38 -38
- package/dist/docs/reference/sessions.md +13 -0
- package/dist/docs/reference/skills.html +40 -40
- package/dist/docs/reference/subagents.html +37 -37
- package/dist/docs/reference/tools.html +37 -37
- package/dist/docs/templates/agentic-owners.html +37 -37
- package/dist/docs/templates/reviews.html +37 -37
- package/dist/docs/troubleshooting.html +38 -38
- package/dist/docs/troubleshooting.md +21 -0
- package/dist/evals/run-facts.d.ts.map +1 -1
- package/dist/evals/run-facts.js +4 -0
- package/dist/extensions/cursor-cloud-agents/channels/cursor-cloud-agents.d.ts +12 -0
- package/dist/extensions/cursor-cloud-agents/channels/cursor-cloud-agents.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/channels/cursor-cloud-agents.js +42 -0
- package/dist/extensions/cursor-cloud-agents/extension.d.ts +10 -7
- package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/extension.js +3 -2
- package/dist/extensions/cursor-cloud-agents/lib/agent-id.d.ts +5 -0
- package/dist/extensions/cursor-cloud-agents/lib/agent-id.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/agent-id.js +10 -0
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +57 -3
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/backend.js +150 -35
- package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts +32 -4
- package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/fleet.js +93 -7
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +24 -7
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +158 -25
- package/dist/extensions/cursor-cloud-agents/lib/stop-signal.d.ts +18 -0
- package/dist/extensions/cursor-cloud-agents/lib/stop-signal.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/stop-signal.js +27 -0
- package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -3
- package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts +26 -12
- package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/watch.js +115 -46
- package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts +16 -5
- package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +76 -20
- package/dist/extensions/cursor-cloud-agents/skills/handoff.md +2 -2
- package/dist/extensions/cursor-cloud-agents/tools/get.js +2 -2
- package/dist/extensions/cursor-cloud-agents/tools/launch.js +1 -1
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +18 -3
- package/dist/files-backends/agent-store-presigned-url.js +5 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/internal/approval-gate.d.ts +6 -1
- package/dist/internal/approval-gate.d.ts.map +1 -1
- package/dist/internal/approval-gate.js +13 -2
- package/dist/internal/authored-loaders.js +1 -1
- package/dist/internal/channel-architecture.d.ts.map +1 -1
- package/dist/internal/channel-architecture.js +3 -1
- package/dist/internal/cli/commands/channels.d.ts +9 -3
- package/dist/internal/cli/commands/channels.d.ts.map +1 -1
- package/dist/internal/cli/commands/channels.js +193 -4
- package/dist/internal/cli/commands/index.d.ts.map +1 -1
- package/dist/internal/cli/commands/index.js +6 -1
- package/dist/internal/cli/commands/serve.d.ts.map +1 -1
- package/dist/internal/cli/commands/serve.js +25 -5
- package/dist/internal/cli/dispatch.d.ts.map +1 -1
- package/dist/internal/cli/dispatch.js +22 -8
- package/dist/internal/cli/flags.d.ts +14 -0
- package/dist/internal/cli/flags.d.ts.map +1 -1
- package/dist/internal/cli/flags.js +14 -0
- package/dist/internal/cli/help.d.ts.map +1 -1
- package/dist/internal/cli/help.js +3 -1
- package/dist/internal/cli-cursor.js +2 -2
- package/dist/internal/cli-deploy.d.ts +1 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +31 -8
- package/dist/internal/cli-mcp.d.ts.map +1 -1
- package/dist/internal/cli-mcp.js +5 -3
- package/dist/internal/cli-teams-doctor.d.ts +39 -0
- package/dist/internal/cli-teams-doctor.d.ts.map +1 -0
- package/dist/internal/cli-teams-doctor.js +508 -0
- package/dist/internal/cli-teams-forward.d.ts +84 -0
- package/dist/internal/cli-teams-forward.d.ts.map +1 -0
- package/dist/internal/cli-teams-forward.js +386 -0
- package/dist/internal/cli-teams-package.d.ts +26 -0
- package/dist/internal/cli-teams-package.d.ts.map +1 -0
- package/dist/internal/cli-teams-package.js +123 -0
- package/dist/internal/cli-teams.d.ts +15 -0
- package/dist/internal/cli-teams.d.ts.map +1 -0
- package/dist/internal/cli-teams.js +253 -0
- package/dist/internal/connect-click.d.ts +12 -0
- package/dist/internal/connect-click.d.ts.map +1 -0
- package/dist/internal/connect-click.js +22 -0
- package/dist/internal/continuation-channel.d.ts +5 -1
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +34 -0
- package/dist/internal/continuation-identity.d.ts +7 -4
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +66 -1
- package/dist/internal/convert-automation/convert-workflow.js +2 -2
- package/dist/internal/credential-env-names.d.ts +36 -0
- package/dist/internal/credential-env-names.d.ts.map +1 -0
- package/dist/internal/credential-env-names.js +68 -0
- package/dist/internal/cursor/account-mcp.d.ts +67 -9
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +206 -25
- package/dist/internal/cursor/backend-client.d.ts +10 -1
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +19 -7
- package/dist/internal/cursor/cloud-agent-identity.d.ts +81 -0
- package/dist/internal/cursor/cloud-agent-identity.d.ts.map +1 -0
- package/dist/internal/cursor/cloud-agent-identity.js +224 -0
- package/dist/internal/cursor/credentials.d.ts.map +1 -1
- package/dist/internal/cursor/credentials.js +3 -1
- package/dist/internal/cursor-account-mcp-auth.d.ts +1 -0
- package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -1
- package/dist/internal/cursor-account-mcp-auth.js +2 -1
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +34 -2
- package/dist/internal/deploy-manifest.d.ts +51 -3
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +96 -7
- package/dist/internal/discovery/agent-config.d.ts.map +1 -1
- package/dist/internal/discovery/agent-config.js +6 -1
- package/dist/internal/discovery/connections.d.ts.map +1 -1
- package/dist/internal/discovery/connections.js +53 -0
- package/dist/internal/discovery/extensions.d.ts.map +1 -1
- package/dist/internal/discovery/extensions.js +2 -0
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +4 -0
- package/dist/internal/env-file.d.ts +1 -0
- package/dist/internal/env-file.d.ts.map +1 -1
- package/dist/internal/env-file.js +18 -17
- package/dist/internal/env-prefix.d.ts +11 -0
- package/dist/internal/env-prefix.d.ts.map +1 -0
- package/dist/internal/env-prefix.js +23 -0
- package/dist/internal/event-id-dedupe.d.ts +12 -0
- package/dist/internal/event-id-dedupe.d.ts.map +1 -0
- package/dist/{channels/slack → internal}/event-id-dedupe.js +7 -4
- package/dist/internal/event-mapper.d.ts +7 -2
- package/dist/internal/event-mapper.d.ts.map +1 -1
- package/dist/internal/event-mapper.js +7 -0
- package/dist/internal/expected-delivery-failure.d.ts.map +1 -1
- package/dist/internal/expected-delivery-failure.js +3 -0
- package/dist/internal/extension-namespace.d.ts +9 -0
- package/dist/internal/extension-namespace.d.ts.map +1 -0
- package/dist/internal/extension-namespace.js +14 -0
- package/dist/internal/guid.d.ts +2 -0
- package/dist/internal/guid.d.ts.map +1 -0
- package/dist/internal/guid.js +4 -0
- package/dist/internal/host-kv-cas.d.ts +13 -0
- package/dist/internal/host-kv-cas.d.ts.map +1 -0
- package/dist/internal/host-kv-cas.js +8 -0
- package/dist/internal/host-kv.d.ts +4 -1
- package/dist/internal/host-kv.d.ts.map +1 -1
- package/dist/internal/host-kv.js +15 -2
- package/dist/internal/hosted-catch-protocol.d.ts +5 -0
- package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-catch-protocol.js +5 -0
- package/dist/internal/hosted-catch.d.ts +2 -0
- package/dist/internal/hosted-catch.d.ts.map +1 -1
- package/dist/internal/hosted-catch.js +6 -1
- package/dist/internal/hosted-delivery-protocol.d.ts +6 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +71 -1
- package/dist/internal/hosted-delivery.d.ts +5 -2
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +36 -12
- package/dist/internal/hosted-execution-latency.d.ts +3 -0
- package/dist/internal/hosted-execution-latency.d.ts.map +1 -1
- package/dist/internal/hosted-execution-latency.js +11 -0
- package/dist/internal/hosted-session-fixture.js +1 -1
- package/dist/internal/hosting.d.ts +5 -0
- package/dist/internal/hosting.d.ts.map +1 -1
- package/dist/internal/hosting.js +7 -1
- package/dist/internal/install-cursor-skills.d.ts +6 -7
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +15 -9
- package/dist/internal/interview/agent-questions.d.ts +1 -1
- package/dist/internal/interview/agent-questions.d.ts.map +1 -1
- package/dist/internal/interview/agent-questions.js +4 -3
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +24 -0
- package/dist/internal/mcp-allowlist-in-use.d.ts +23 -0
- package/dist/internal/mcp-allowlist-in-use.d.ts.map +1 -0
- package/dist/internal/mcp-allowlist-in-use.js +93 -0
- package/dist/internal/mcp-endpoint.d.ts.map +1 -1
- package/dist/internal/mcp-endpoint.js +8 -10
- package/dist/internal/mcp-host.d.ts +19 -1
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +67 -3
- package/dist/internal/mcp-oauth.d.ts.map +1 -1
- package/dist/internal/mcp-oauth.js +5 -7
- package/dist/internal/oidcAudiences.d.ts +22 -0
- package/dist/internal/oidcAudiences.d.ts.map +1 -0
- package/dist/internal/oidcAudiences.js +35 -0
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +2 -0
- package/dist/internal/platform-timers.d.ts +2 -0
- package/dist/internal/platform-timers.d.ts.map +1 -1
- package/dist/internal/platform-timers.js +14 -0
- package/dist/internal/private-file.d.ts +32 -1
- package/dist/internal/private-file.d.ts.map +1 -1
- package/dist/internal/private-file.js +209 -7
- package/dist/internal/redact-values.d.ts +3 -0
- package/dist/internal/redact-values.d.ts.map +1 -0
- package/dist/internal/redact-values.js +19 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts +7 -1
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
- package/dist/internal/reminder-followup-error.d.ts +23 -0
- package/dist/internal/reminder-followup-error.d.ts.map +1 -0
- package/dist/internal/reminder-followup-error.js +12 -0
- package/dist/internal/reminder-runner.d.ts +15 -1
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +95 -21
- package/dist/internal/resolved-connections.d.ts.map +1 -1
- package/dist/internal/resolved-connections.js +23 -3
- package/dist/internal/run-client.js +2 -1
- package/dist/internal/run-program.d.ts +31 -0
- package/dist/internal/run-program.d.ts.map +1 -0
- package/dist/internal/run-program.js +150 -0
- package/dist/internal/sdk-runner.d.ts +29 -3
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +304 -38
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +53 -8
- package/dist/internal/session-credential.d.ts +14 -0
- package/dist/internal/session-credential.d.ts.map +1 -0
- package/dist/internal/session-credential.js +25 -0
- package/dist/internal/session-engine.d.ts +137 -5
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +606 -92
- package/dist/internal/storage-coordinator.d.ts +3 -1
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +13 -0
- package/dist/internal/storage-roles.d.ts +9 -1
- package/dist/internal/storage-roles.d.ts.map +1 -1
- package/dist/internal/tcp-address.d.ts +3 -1
- package/dist/internal/tcp-address.d.ts.map +1 -1
- package/dist/internal/tcp-address.js +6 -0
- package/dist/internal/teams-channel-profile.d.ts +41 -0
- package/dist/internal/teams-channel-profile.d.ts.map +1 -0
- package/dist/internal/teams-channel-profile.js +91 -0
- package/dist/internal/teams-devtunnel.d.ts +55 -0
- package/dist/internal/teams-devtunnel.d.ts.map +1 -0
- package/dist/internal/teams-devtunnel.js +205 -0
- package/dist/internal/teams-tunnel-proxy.d.ts +17 -0
- package/dist/internal/teams-tunnel-proxy.d.ts.map +1 -0
- package/dist/internal/teams-tunnel-proxy.js +100 -0
- package/dist/internal/testing/conversation-identity-vectors.d.ts +7 -1
- package/dist/internal/testing/conversation-identity-vectors.d.ts.map +1 -1
- package/dist/internal/testing/conversation-identity-vectors.js +67 -0
- package/dist/internal/testing/hosted-http.d.ts +15 -0
- package/dist/internal/testing/hosted-http.d.ts.map +1 -0
- package/dist/internal/testing/hosted-http.js +86 -0
- package/dist/internal/testing/teams-activity-fixtures.d.ts +28 -0
- package/dist/internal/testing/teams-activity-fixtures.d.ts.map +1 -0
- package/dist/internal/testing/teams-activity-fixtures.js +236 -0
- package/dist/internal/testing/teams-doctor-fixtures.d.ts +76 -0
- package/dist/internal/testing/teams-doctor-fixtures.d.ts.map +1 -0
- package/dist/internal/testing/teams-doctor-fixtures.js +216 -0
- package/dist/internal/tunnel-process.d.ts +29 -0
- package/dist/internal/tunnel-process.d.ts.map +1 -0
- package/dist/internal/tunnel-process.js +105 -0
- package/dist/internal/turn-context.d.ts +28 -0
- package/dist/internal/turn-context.d.ts.map +1 -0
- package/dist/internal/turn-context.js +1 -0
- package/dist/oidc-token.d.ts +127 -0
- package/dist/oidc-token.d.ts.map +1 -0
- package/dist/oidc-token.js +221 -0
- package/dist/playground/assets/index-BaBSZXki.css +1 -0
- package/dist/playground/assets/index-BkAF8YlO.js +62 -0
- package/dist/playground/index.html +2 -2
- package/dist/teams-app-package.d.ts +78 -0
- package/dist/teams-app-package.d.ts.map +1 -0
- package/dist/teams-app-package.js +204 -0
- package/dist/tools.d.ts +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/types.d.ts +278 -2
- package/dist/types.d.ts.map +1 -1
- package/docs/changelog.md +51 -0
- package/docs/deployment.md +10 -0
- package/docs/guides/cloud-agents.md +47 -0
- package/docs/guides/teams.md +389 -0
- package/docs/reference/channels.md +1 -0
- package/docs/reference/cli.md +116 -0
- package/docs/reference/limits.md +4 -4
- package/docs/reference/sessions.md +13 -0
- package/docs/troubleshooting.md +21 -0
- package/package.json +21 -46
- package/skills/create-agent/SKILL.md +17 -4
- package/skills/debug/SKILL.md +1 -0
- package/skills/deploy/SKILL.md +1 -1
- package/skills/framework-map/SKILL.md +1 -0
- package/skills/setup-teams/SKILL.md +141 -0
- package/templates/agentic-owners/bot/lib/owners/parse.ts +1 -0
- package/dist/channels/slack/event-id-dedupe.d.ts +0 -10
- package/dist/channels/slack/event-id-dedupe.d.ts.map +0 -1
- package/dist/docs/assets/changelog.md.BMrJ5WxW.js +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.dUaE1f8e.js +0 -1
- package/dist/docs/assets/chunks/channel.ljJtQtBi.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BZ3Uc-XU.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BZ3Uc-XU.js +0 -1
- package/dist/docs/assets/chunks/clone.BDtbEo69.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CbhzVsQE.js +0 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.BFIVMaoi.js +0 -162
- package/dist/docs/assets/guides_cloud-agents.md.CiXAW6on.js +0 -9
- package/dist/docs/assets/troubleshooting.md.DfKKvW1R.js +0 -3
- package/dist/playground/assets/index-D0-FHg1x.css +0 -1
- package/dist/playground/assets/index-D5SLKUy6.js +0 -62
- /package/dist/docs/assets/{reference_channels.md.CPWOpdsC.lean.js → reference_channels.md.CRvqgU0n.lean.js} +0 -0
- /package/dist/docs/assets/{reference_schedules.md.RhQ9ZLo1.lean.js → reference_schedules.md.Dd8_d0WG.lean.js} +0 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Microsoft Teams"
|
|
3
|
+
description: "Answer mentions, personal chats, and watched channel posts in Microsoft Teams with your own Azure Bot."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Microsoft Teams agents
|
|
7
|
+
|
|
8
|
+
A Teams agent wakes when someone @mentions it in a channel or group chat,
|
|
9
|
+
messages it in a personal chat, or posts in a channel it watches. It
|
|
10
|
+
answers in the same reply chain. `teamsChannel()` takes the same engagement options as
|
|
11
|
+
`slackChannel()`, so an agent that already runs in Slack can run in Teams
|
|
12
|
+
with the same shape of config.
|
|
13
|
+
|
|
14
|
+
The agent answers as an Azure Bot that you register and own. Teams sends
|
|
15
|
+
each message to the bot's messaging endpoint, and the channel checks the
|
|
16
|
+
Bot Framework token on every request before it starts a turn.
|
|
17
|
+
|
|
18
|
+
## Set up with the CLI
|
|
19
|
+
|
|
20
|
+
The `agent-sdk channels teams` commands do every step except the clicks in
|
|
21
|
+
the Azure portal and in Teams:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
agent-sdk channels teams setup
|
|
25
|
+
printf %s "$CLIENT_SECRET" | agent-sdk channels teams init --dir ./helm \
|
|
26
|
+
--app-id <microsoft-app-id> --tenant-id <app-tenant-id>
|
|
27
|
+
agent-sdk channels teams package --dir ./helm
|
|
28
|
+
agent-sdk dev ./helm
|
|
29
|
+
agent-sdk channels teams doctor --dir ./helm --endpoint <printed URL>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
1. `setup` prints the Azure portal steps in
|
|
33
|
+
[Register the Azure Bot](#register-the-azure-bot).
|
|
34
|
+
2. `init` writes `bot/channels/teams.ts` and puts the app id, the client
|
|
35
|
+
secret, and the tenant id in `.env.local`. It reads the secret from a
|
|
36
|
+
hidden prompt or stdin, never from an argument.
|
|
37
|
+
3. `package` writes `helm-teams-app.zip`. Upload it in Teams, as
|
|
38
|
+
[Install the bot in Teams](#install-the-bot-in-teams) describes.
|
|
39
|
+
4. `dev` opens a tunnel and prints the messaging endpoint. Set it on the
|
|
40
|
+
Azure Bot.
|
|
41
|
+
5. `doctor` checks the env names, the token, the Azure Bot, and the
|
|
42
|
+
endpoint, and names the part that fails.
|
|
43
|
+
|
|
44
|
+
The [CLI reference](../reference/cli.md#teams) lists every flag. The rest of
|
|
45
|
+
this guide explains what the commands write and how the channel behaves.
|
|
46
|
+
|
|
47
|
+
## Answer a mention or personal chat
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
// bot/channels/teams.ts
|
|
51
|
+
import { teamsChannel } from "@grok/agent-sdk/channels/teams";
|
|
52
|
+
|
|
53
|
+
export default teamsChannel();
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
By default the agent answers @mentions in channels and group chats, and
|
|
57
|
+
every message in a personal chat. While a turn runs, Teams shows the
|
|
58
|
+
typing indicator, and the reply arrives as one message in the reply chain.
|
|
59
|
+
In a channel, each reply chain is its own conversation. A personal chat
|
|
60
|
+
and a group chat have no reply chains, so each one is a single
|
|
61
|
+
conversation.
|
|
62
|
+
|
|
63
|
+
The channel reads three variables:
|
|
64
|
+
|
|
65
|
+
| Variable | Value |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `TEAMS_APP_ID` | The Azure Bot's Microsoft App ID |
|
|
68
|
+
| `TEAMS_APP_PASSWORD` | A client secret of that app registration |
|
|
69
|
+
| `TEAMS_TENANT_ID` | Required. The home tenant of your single-tenant Azure Bot |
|
|
70
|
+
|
|
71
|
+
The Azure Bot is a single-tenant bot in your own tenant, because Azure
|
|
72
|
+
does not create new multi-tenant bots after July 31, 2025. The channel
|
|
73
|
+
mints its Bot Connector token in that tenant and ignores activities from
|
|
74
|
+
any other tenant. To run several
|
|
75
|
+
agents in one `agent-sdk dev`, give each its own bot and an `envPrefix`.
|
|
76
|
+
`channels teams init --prefix HELPDESK` writes it for you. The prefix
|
|
77
|
+
starts with a letter.
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
export default teamsChannel({ envPrefix: "HELPDESK" });
|
|
81
|
+
// HELPDESK_TEAMS_APP_ID, HELPDESK_TEAMS_APP_PASSWORD, HELPDESK_TEAMS_TENANT_ID
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The channel file owns these names. When the file exists, `init` writes the
|
|
85
|
+
names it reads, and `doctor` and `package` read them from the loaded
|
|
86
|
+
channel.
|
|
87
|
+
|
|
88
|
+
## Register the Azure Bot
|
|
89
|
+
|
|
90
|
+
1. In the Azure portal, create an **Azure Bot** resource. Set **Type of
|
|
91
|
+
App** to **Single Tenant** and **Creation type** to **Create new
|
|
92
|
+
Microsoft App ID**.
|
|
93
|
+
2. Open the bot's **Configuration** page. Copy **Microsoft App ID** and
|
|
94
|
+
**App Tenant ID**. `init` takes them as `--app-id` and `--tenant-id`.
|
|
95
|
+
3. From **Configuration**, open **Manage Password**, add a client secret,
|
|
96
|
+
and copy its value. Azure shows the value once. `init` reads it from
|
|
97
|
+
the hidden prompt or stdin.
|
|
98
|
+
4. Under **Channels**, add **Microsoft Teams**.
|
|
99
|
+
5. Set **Messaging endpoint** to the URL in
|
|
100
|
+
[Messaging endpoint](#messaging-endpoint), or for a hosted deploy, the
|
|
101
|
+
URL in [Deploy](#deploy).
|
|
102
|
+
|
|
103
|
+
## Install the bot in Teams
|
|
104
|
+
|
|
105
|
+
Teams installs a bot from an app package: a zip of `manifest.json` and two
|
|
106
|
+
icons. `agent-sdk channels teams package` builds it from the channel. The
|
|
107
|
+
`bots` entry names the Azure Bot by its app ID and the places people can
|
|
108
|
+
talk to it:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"id": "<TEAMS_APP_ID>",
|
|
113
|
+
"bots": [
|
|
114
|
+
{
|
|
115
|
+
"botId": "<TEAMS_APP_ID>",
|
|
116
|
+
"scopes": ["personal", "team", "groupChat"],
|
|
117
|
+
"isNotificationOnly": false
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
A full manifest also needs `manifestVersion`, `version`, `developer`,
|
|
124
|
+
`name`, `description`, `icons`, and `accentColor`; see the
|
|
125
|
+
[app manifest schema](https://learn.microsoft.com/microsoftteams/platform/resources/schema/manifest-schema).
|
|
126
|
+
Upload the package in Teams under **Apps** > **Manage your apps** >
|
|
127
|
+
**Upload an app**, or have a Teams admin publish it to your organization
|
|
128
|
+
in the Teams admin center. Then add the app to a team, a group chat, or a
|
|
129
|
+
personal chat.
|
|
130
|
+
|
|
131
|
+
## Wake on a channel post
|
|
132
|
+
|
|
133
|
+
Teams sends a channel post without a mention only to an app that holds
|
|
134
|
+
the resource-specific consent permission `ChannelMessage.Read.Group`.
|
|
135
|
+
`package` adds it when the channel sets `engagement.channelPosts`, and a
|
|
136
|
+
team owner grants it when they add the app to the team:
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"webApplicationInfo": { "id": "<TEAMS_APP_ID>" },
|
|
141
|
+
"authorization": {
|
|
142
|
+
"permissions": {
|
|
143
|
+
"resourceSpecific": [{ "name": "ChannelMessage.Read.Group", "type": "Application" }]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Then name the channels to watch. Copy a channel's ID from its **Get link
|
|
150
|
+
to channel** URL: it's the `19:…@thread.tacv2` part.
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
export default teamsChannel({
|
|
154
|
+
engagement: {
|
|
155
|
+
channelPosts: {
|
|
156
|
+
allow: ["19:4b7c2f9e1d6a4e8f9a3b5c7d1e2f3a4b@thread.tacv2"],
|
|
157
|
+
posts: "all",
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Watched posts go to `onChannelPost` when you set it, the same way
|
|
164
|
+
mentions go to `onAppMention` and personal chats to `onDirectMessage`.
|
|
165
|
+
Return `null` from a hook to skip a message. `posts` is `"top-level"` (the
|
|
166
|
+
default), `"replies"`, or `"all"`. Use
|
|
167
|
+
`allow: ["*"]` to watch every channel the app is in, and
|
|
168
|
+
`replies: "joined"` to also answer replies in any reply chain the agent
|
|
169
|
+
already answered. Bot posts stay out unless you set `includeBotPosts: true`;
|
|
170
|
+
the agent's own posts never start a turn.
|
|
171
|
+
|
|
172
|
+
To let another bot wake the agent with an @mention, list it in
|
|
173
|
+
`engagement.botMentions.allowFrom` as `28:<its app ID>`. Each thread allows
|
|
174
|
+
5 bot wakes an hour and 20 in total by default
|
|
175
|
+
(`maxPerThreadPerHour`, `maxPerThreadTotal`).
|
|
176
|
+
|
|
177
|
+
## Stream the reply
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
export default teamsChannel({ reply: { mode: "stream" } });
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
In stream mode the agent posts one message as soon as it starts working.
|
|
184
|
+
That message names the tool the agent is running until text arrives, then
|
|
185
|
+
fills in as the reply grows, and it ends as the final answer. Teams limits
|
|
186
|
+
how often a bot can edit a message, so the channel edits at most once
|
|
187
|
+
every 1.5 seconds; set `updateIntervalMs` to change that.
|
|
188
|
+
|
|
189
|
+
## Approve tool calls in Teams
|
|
190
|
+
|
|
191
|
+
```ts
|
|
192
|
+
export default teamsChannel({ toolApprovals: true });
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
When a server tool with `needsApproval` is about to run, the agent posts
|
|
196
|
+
an Adaptive Card in the thread with the tool's arguments, secrets
|
|
197
|
+
redacted, and **Approve** and **Deny** buttons. Anyone who could continue
|
|
198
|
+
the conversation can decide; set `policy: { respondTo: "author" }` to
|
|
199
|
+
limit that, and follow-ups, to the person who started it. After the click,
|
|
200
|
+
the card shows the decision and who made it.
|
|
201
|
+
|
|
202
|
+
For your own cards, handle other `Action.Submit` clicks in
|
|
203
|
+
`onCardAction`, which receives the submitted data and can start a turn in
|
|
204
|
+
the card's thread.
|
|
205
|
+
|
|
206
|
+
## Refuse guests and other tenants
|
|
207
|
+
|
|
208
|
+
By default the channel answers only members and owners of the bot's
|
|
209
|
+
tenant. It asks Teams for the sender's role and tenant. It refuses a
|
|
210
|
+
guest, an anonymous meeting user, or a person from another organization.
|
|
211
|
+
This applies when they message the agent and when they click a card.
|
|
212
|
+
**Approve** and **Deny** are card clicks. A sender with no role is
|
|
213
|
+
refused. A sender Teams does not list is refused too.
|
|
214
|
+
|
|
215
|
+
The agent posts one short reply to a refused sender. It posts at most
|
|
216
|
+
once per conversation and sender per hour. The default text is "I can
|
|
217
|
+
only help members of this organization. Ask the agent owner to allow
|
|
218
|
+
guests."
|
|
219
|
+
|
|
220
|
+
Set `policy.refusalMessage` to change the default text. Set
|
|
221
|
+
`policy.refusalMessage` to `false` to stay silent. Silence applies to a
|
|
222
|
+
refused sender and to a sender the lookup could not verify.
|
|
223
|
+
|
|
224
|
+
A failed lookup gets the reply "I couldn't verify your access, try again
|
|
225
|
+
shortly." The agent does not reply to a card click from a refused sender.
|
|
226
|
+
The agent ignores a card click from a bot, including a bot that
|
|
227
|
+
`engagement.botMentions` allows. The agent does not reply to an activity
|
|
228
|
+
from another tenant.
|
|
229
|
+
|
|
230
|
+
To let guests and external members in, set `blockExternals` to `false`.
|
|
231
|
+
|
|
232
|
+
```ts
|
|
233
|
+
export default teamsChannel({ policy: { blockExternals: false } });
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
```ts
|
|
237
|
+
export default teamsChannel({
|
|
238
|
+
policy: {
|
|
239
|
+
refusalMessage: "Ask your team owner to add you to this organization.",
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Welcome message
|
|
245
|
+
|
|
246
|
+
When someone installs the app in a conversation, the agent posts one
|
|
247
|
+
greeting there. Teams reports the install as an `installationUpdate`
|
|
248
|
+
activity whose action is `add`. The greeting does not start a model turn.
|
|
249
|
+
The agent posts it once per conversation.
|
|
250
|
+
|
|
251
|
+
The default text is "Hi! Mention me in a channel, or message me here, to
|
|
252
|
+
get started."
|
|
253
|
+
|
|
254
|
+
Set `welcome` to change the greeting. Set `welcome` to `false` to turn
|
|
255
|
+
it off.
|
|
256
|
+
|
|
257
|
+
```ts
|
|
258
|
+
export default teamsChannel({
|
|
259
|
+
welcome: "Hi. Mention me when you want help with a laptop.",
|
|
260
|
+
});
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Messaging endpoint
|
|
264
|
+
|
|
265
|
+
Under `agent-sdk dev` or self-hosted `agent-sdk serve`, the Azure Bot's
|
|
266
|
+
messaging endpoint is the server's public origin plus the channel's path:
|
|
267
|
+
|
|
268
|
+
```text
|
|
269
|
+
https://<origin>/<slug>/v1/channels/<channel>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
`<slug>` is the agent's slug and `<channel>` is the channel file's name, so
|
|
273
|
+
`bot/channels/teams.ts` in the `helm` agent answers at
|
|
274
|
+
`https://<origin>/helm/v1/channels/teams`. The URL has no trailing slash.
|
|
275
|
+
With `teamsChannel({ path: "/messages" })`, the channel appends that path:
|
|
276
|
+
`https://<origin>/helm/v1/channels/teams/messages`. A hosted deploy has a
|
|
277
|
+
different URL; see [Deploy](#deploy).
|
|
278
|
+
|
|
279
|
+
## Test locally
|
|
280
|
+
|
|
281
|
+
Teams reaches the bot only at a public HTTPS URL. `agent-sdk dev` opens a
|
|
282
|
+
`cloudflared` tunnel and prints the messaging endpoint on the tunnel's
|
|
283
|
+
origin:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
agent-sdk dev ./helm
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Copy the printed URL into the Azure Bot's **Messaging endpoint**, then
|
|
290
|
+
mention the bot in Teams. `--tunnel devtunnel` keeps one URL across
|
|
291
|
+
restarts. Next to a plain `agent-sdk serve`, `agent-sdk channels teams
|
|
292
|
+
forward` opens the same tunnel. `agent-sdk dev --mode single` serves one agent
|
|
293
|
+
without a slug, so its endpoint is `https://<origin>/v1/channels/teams`.
|
|
294
|
+
Without `--mode single`, the endpoint includes the agent's slug:
|
|
295
|
+
`https://<origin>/helm/v1/channels/teams`.
|
|
296
|
+
|
|
297
|
+
To run your own tunnel instead, serve with plain `agent-sdk serve`, which
|
|
298
|
+
opens no tunnel, and point `cloudflared` at its port:
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
agent-sdk serve --dir ./helm --mode single --port 3978
|
|
302
|
+
cloudflared tunnel --url http://localhost:3978
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Add `--protocol http2` to `cloudflared` if your network blocks QUIC. Set the
|
|
306
|
+
Azure Bot's **Messaging endpoint** to the printed `<public-url>` plus
|
|
307
|
+
`/v1/channels/teams`, or `<public-url>/helm/v1/channels/teams` without
|
|
308
|
+
`--mode single`. The built-in tunnel forwards only `POST` requests to the
|
|
309
|
+
Teams messaging paths. A tunnel you run yourself exposes every route on the
|
|
310
|
+
port.
|
|
311
|
+
|
|
312
|
+
Requests through a tunnel always get the Bot Framework token check, so only
|
|
313
|
+
Teams can start turns there. A tunnel adds proxy headers or forwards its
|
|
314
|
+
public hostname, and the dev exception for unsigned activities refuses both.
|
|
315
|
+
To replay a saved activity without Teams, POST it to the same path on
|
|
316
|
+
`http://127.0.0.1:<port>` from the same machine; `agent-sdk dev` admits
|
|
317
|
+
unsigned activities from loopback only.
|
|
318
|
+
|
|
319
|
+
## Deploy
|
|
320
|
+
|
|
321
|
+
Hosted, the agent needs its three secrets:
|
|
322
|
+
|
|
323
|
+
```ts
|
|
324
|
+
// bot/agent.ts
|
|
325
|
+
import { defineAgent } from "@grok/agent-sdk";
|
|
326
|
+
|
|
327
|
+
export default defineAgent({
|
|
328
|
+
hosting: {
|
|
329
|
+
secretNames: ["TEAMS_APP_ID", "TEAMS_APP_PASSWORD", "TEAMS_TENANT_ID"],
|
|
330
|
+
},
|
|
331
|
+
});
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Hosting adds the Microsoft hosts that a Teams channel calls
|
|
335
|
+
(`login.microsoftonline.com`, `login.botframework.com`, and
|
|
336
|
+
`smba.trafficmanager.net`), so you do not list them in `egressDomains`.
|
|
337
|
+
Your team's network settings still apply to them. If your team restricts
|
|
338
|
+
egress, its allowlist must include all three hosts, or the agent's replies
|
|
339
|
+
fail.
|
|
340
|
+
|
|
341
|
+
An `envPrefix` changes the secret names. With
|
|
342
|
+
`teamsChannel({ envPrefix: "ECHO" })`, list `ECHO_TEAMS_APP_ID`,
|
|
343
|
+
`ECHO_TEAMS_APP_PASSWORD`, and `ECHO_TEAMS_TENANT_ID` in `secretNames`, and
|
|
344
|
+
set those names with `agent-sdk secret set`.
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
agent-sdk deploy --dir . --slug helpdesk
|
|
348
|
+
agent-sdk secret set helpdesk TEAMS_APP_ID
|
|
349
|
+
agent-sdk secret set helpdesk TEAMS_APP_PASSWORD
|
|
350
|
+
agent-sdk secret set helpdesk TEAMS_TENANT_ID
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
`agent-sdk deploy` prints the hosted messaging endpoint on a `public:`
|
|
354
|
+
line that ends in `/v1/channels/teams`. Set the Azure Bot's **Messaging
|
|
355
|
+
endpoint** to that URL, not to the slug URL from local testing. With a
|
|
356
|
+
custom `path`, add it after the printed URL.
|
|
357
|
+
|
|
358
|
+
On hosting, Cursor checks the Bot Framework token and the tenant before
|
|
359
|
+
the agent starts. Activities that the channel cannot act on, such as a
|
|
360
|
+
reaction or an unmentioned post outside `channelPosts`, stop there and
|
|
361
|
+
use no compute. Each personal or group chat is one session, and each
|
|
362
|
+
channel reply chain is one session. Tool approvals work on hosting: an
|
|
363
|
+
Approve or Deny click reaches the turn that waits for it, and a call that
|
|
364
|
+
nobody approves in 10 minutes is denied.
|
|
365
|
+
|
|
366
|
+
Hosting runs Teams channels only in the commercial Microsoft cloud, and
|
|
367
|
+
only for teams that have Teams channels turned on. The deploy fails
|
|
368
|
+
otherwise.
|
|
369
|
+
|
|
370
|
+
## How Teams differs from Slack
|
|
371
|
+
|
|
372
|
+
| | Slack | Teams |
|
|
373
|
+
| --- | --- | --- |
|
|
374
|
+
| App | Your Slack app's bot and app tokens | Your Azure Bot's app ID, client secret, and tenant |
|
|
375
|
+
| Local transport | Socket Mode, no public URL | `agent-sdk dev` opens a tunnel to the messaging endpoint |
|
|
376
|
+
| Watch channel posts | `message.channels` subscription | `ChannelMessage.Read.Group` consent at install |
|
|
377
|
+
| Threads | Every message can start a thread | Reply chains in channels; personal and group chats are one conversation each |
|
|
378
|
+
| Bot-to-bot wakes | `maxDepth` from message metadata, plus per-thread caps | Per-thread caps only |
|
|
379
|
+
| Progress | Status chip, streaming API, tool and reasoning cards | Typing indicator, or one edited message in stream mode |
|
|
380
|
+
| Approvals | Block Kit buttons | Adaptive Card buttons |
|
|
381
|
+
| Hosted sessions | One per thread | One per chat, or one per channel reply chain |
|
|
382
|
+
| Not available in Teams | | Reactions, file uploads and downloads, suggested prompts, `eval` commands, edit debounce |
|
|
383
|
+
|
|
384
|
+
## Related
|
|
385
|
+
|
|
386
|
+
- [Slack](./slack.md)
|
|
387
|
+
- [Webhooks](./webhooks.md)
|
|
388
|
+
- [Deployment](../deployment.md)
|
|
389
|
+
- [Channels reference](../reference/channels.md)
|
|
@@ -150,6 +150,7 @@ Import each one from `@grok/agent-sdk/channels/<name>`.
|
|
|
150
150
|
| Function | Details |
|
|
151
151
|
| --- | --- |
|
|
152
152
|
| `slackChannel()` | [Slack](../guides/slack.md) |
|
|
153
|
+
| `teamsChannel()` | [Microsoft Teams](../guides/teams.md) |
|
|
153
154
|
| `githubChannel()` | [GitHub](../guides/github.md) |
|
|
154
155
|
| `gitlabChannel()` | [GitLab](../guides/gitlab.md) |
|
|
155
156
|
| `bitbucketChannel()` | [Bitbucket](../guides/bitbucket.md) |
|
package/docs/reference/cli.md
CHANGED
|
@@ -70,6 +70,7 @@ command remains available.
|
|
|
70
70
|
| [`mcp serve`, `mcp install`](#mcp) | Connect an MCP client to an agent |
|
|
71
71
|
| [`mcp oauth`](#mcp-oauth) | Authorize an MCP connection |
|
|
72
72
|
| [`slack`](#slack) | Provision and check Slack channel apps |
|
|
73
|
+
| [`teams`](#teams) | Connect, check, and package a Microsoft Teams bot |
|
|
73
74
|
| [`github`](#github) | Forward, replay, and inspect GitHub webhooks |
|
|
74
75
|
| [`gitlab`, `bitbucket`, `pagerduty`](#replay-other-webhooks) | Replay and inspect GitLab, Bitbucket, or PagerDuty webhooks |
|
|
75
76
|
|
|
@@ -135,6 +136,12 @@ agent-sdk dev ./agent-sdk-pr-reviewer --port 3000
|
|
|
135
136
|
It accepts every `serve` option. Don't combine the path with a different
|
|
136
137
|
`--dir`.
|
|
137
138
|
|
|
139
|
+
When an agent has a Microsoft Teams channel, `dev` also opens a cloudflared
|
|
140
|
+
quick tunnel and prints that channel's messaging endpoint. Pass
|
|
141
|
+
`--tunnel devtunnel` for an endpoint that stays the same across restarts, and
|
|
142
|
+
`--tunnel-id <id>` to pick the dev tunnel. See
|
|
143
|
+
[Configure Microsoft Teams](#teams).
|
|
144
|
+
|
|
138
145
|
### Serve the docs {#docs}
|
|
139
146
|
|
|
140
147
|
```text
|
|
@@ -539,6 +546,115 @@ token prefix defaults to the project directory name in upper snake case.
|
|
|
539
546
|
`--channel-posts` adds the message events that `engagement.channelPosts`
|
|
540
547
|
needs. See [Slack](../guides/slack.md) for manual setup.
|
|
541
548
|
|
|
549
|
+
### Configure Microsoft Teams {#teams}
|
|
550
|
+
|
|
551
|
+
```text
|
|
552
|
+
agent-sdk channels teams setup
|
|
553
|
+
agent-sdk channels teams init --app-id <guid> --tenant-id <guid> [--dir <path>]
|
|
554
|
+
[--prefix <prefix>] [--dry-run] [--json]
|
|
555
|
+
agent-sdk channels teams doctor [--dir <path>] [--slug <slug>] [--channel <id>]
|
|
556
|
+
[--endpoint <url>] [--json]
|
|
557
|
+
agent-sdk channels teams package [--dir <path>] [--slug <slug>] [--channel <id>]
|
|
558
|
+
[--name <name>] [--icon <png>] [--app-version <x.y.z>] [--endpoint <url>]
|
|
559
|
+
[--out <file>] [--dry-run] [--json]
|
|
560
|
+
agent-sdk channels teams forward [--dir <path>] [--slug <slug>] [--channel <id>]
|
|
561
|
+
[--host <host>] [--port <n>] [--tunnel cloudflared|devtunnel]
|
|
562
|
+
[--tunnel-id <id>] [--json]
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
| Subcommand | Contract |
|
|
566
|
+
| --- | --- |
|
|
567
|
+
| `setup` | Print the Azure Bot setup steps without changing files. |
|
|
568
|
+
| `init` | Read the bot's client secret from a hidden prompt or stdin, never from an argument. Write `bot/channels/teams.ts` when it's missing, and write the app id, secret, and tenant id to `.env.local`. A second `init` keeps the channel file and replaces the secret. |
|
|
569
|
+
| `doctor` | Run the checks below and exit `1` when one fails. A check it can't run is skipped and says why. |
|
|
570
|
+
| `package` | Write the Teams app package: `manifest.json`, a 192 by 192 color icon, and a 32 by 32 outline icon. By default it writes `<slug>-teams-app.zip` in the agent folder and adds `*-teams-app.zip` to `.gitignore`. `--out <file>` writes it to that path instead. Upload it in Teams under **Apps** > **Manage your apps** > **Upload an app**. |
|
|
571
|
+
| `forward` | Open a tunnel to a running `agent-sdk serve` and print the messaging endpoint of each Teams channel. It runs until you stop it. |
|
|
572
|
+
|
|
573
|
+
`agent-sdk dev` opens the same tunnel by itself. The endpoint is the tunnel
|
|
574
|
+
origin plus `/<slug>/v1/channels/<channel>`, such as
|
|
575
|
+
`https://<random>.trycloudflare.com/helm/v1/channels/teams`. Set it as the
|
|
576
|
+
Azure Bot's messaging endpoint. The tunnel forwards only `POST` requests to
|
|
577
|
+
the Teams messaging paths, so the rest of the agent's API stays local. Every
|
|
578
|
+
other request on the tunnel host gets a `404`.
|
|
579
|
+
|
|
580
|
+
`--tunnel` picks the tunnel for `dev` and `channels teams forward`:
|
|
581
|
+
|
|
582
|
+
| `--tunnel` | Needs | Endpoint |
|
|
583
|
+
| --- | --- | --- |
|
|
584
|
+
| `cloudflared` (default) | `cloudflared` on `PATH`. No account. | A new `trycloudflare.com` URL on every start. Set it on the bot again after each restart. |
|
|
585
|
+
| `devtunnel` | The `devtunnel` CLI on `PATH`, logged in with `devtunnel user login`. | The same `devtunnels.ms` URL on every start. Set it on the bot once. |
|
|
586
|
+
|
|
587
|
+
With `devtunnel`, the first start creates a dev tunnel that allows anonymous
|
|
588
|
+
access, adds port `3978`, and saves the tunnel id as `TEAMS_DEVTUNNEL_ID` in
|
|
589
|
+
`.env.local`. Later starts reuse that tunnel. `--tunnel-id <id>` picks the id.
|
|
590
|
+
Microsoft deletes a dev tunnel after 30 days without use, and the next start
|
|
591
|
+
creates it again under the same id. Port `3978` belongs to the tunnel, so
|
|
592
|
+
`--port 3978` with `--tunnel devtunnel` stops with a usage error. Run the agent
|
|
593
|
+
on another port. `devtunnel host` publishes every port on the tunnel, so the
|
|
594
|
+
tunnel stops when it reports a port other than `3978`. Remove that port with
|
|
595
|
+
`devtunnel port delete <id> -p <port>`, or pass another `--tunnel-id`.
|
|
596
|
+
|
|
597
|
+
The package manifest uses Teams manifest version 1.25. It names the bot by
|
|
598
|
+
its app id and lists the scopes the channel answers in: mentions add `team`
|
|
599
|
+
and `groupChat`, and personal chats add `personal`. With
|
|
600
|
+
`engagement.channelPosts`, it also asks for `ChannelMessage.Read.Group`
|
|
601
|
+
consent. `--endpoint` adds the messaging endpoint's host to `validDomains`.
|
|
602
|
+
`--app-version` sets the app version. It defaults to `1.<YYYYMMDD>.<second of
|
|
603
|
+
the day>` in UTC, so each new zip is higher than the last, and Teams and the
|
|
604
|
+
Teams admin center accept it as an update. Teams refuses an update whose
|
|
605
|
+
version is not higher than the installed one. After you set
|
|
606
|
+
`--app-version 2.0.0`, a later default `1.x` version is lower, so keep passing
|
|
607
|
+
a higher `--app-version`. The default's middle part has 8 digits, which is fine
|
|
608
|
+
for a bot-only app. An app that adds an Office Add-in limits each part to 5
|
|
609
|
+
digits.
|
|
610
|
+
|
|
611
|
+
`doctor` runs these checks in order:
|
|
612
|
+
|
|
613
|
+
| Check | Passes when |
|
|
614
|
+
| --- | --- |
|
|
615
|
+
| `env` | The app id, password, and tenant id variables are set. |
|
|
616
|
+
| `token` | Microsoft Entra issues a Bot Framework token for the app within 10 seconds. |
|
|
617
|
+
| `bot-tenant` | The Azure Bot is **Single Tenant** and its tenant is the one in the channel's tenant id variable. |
|
|
618
|
+
| `bot-endpoint` | The Azure Bot's messaging endpoint is `--endpoint`. Without `--endpoint`, it reports the bot's endpoint. |
|
|
619
|
+
| `teams-channel` | The Azure Bot's Microsoft Teams channel is added and on. |
|
|
620
|
+
| `endpoint` | The endpoint's path names this channel, and an unsigned `POST` to it gets `401`. |
|
|
621
|
+
|
|
622
|
+
The three Azure checks need the Azure CLI, logged in with `az login`, on any
|
|
623
|
+
operating system. Without it they are skipped. When no Azure Bot in the
|
|
624
|
+
current subscription has the app id, they fail. Each `az` call has a time
|
|
625
|
+
limit. The endpoint's path must end in `/v1/channels/<channel>` plus the
|
|
626
|
+
channel's `path`, after nothing, the agent's slug, or `/engine` on
|
|
627
|
+
Cursor-managed hosting. A URL for another channel or agent fails without a
|
|
628
|
+
probe. The `endpoint` answers mean:
|
|
629
|
+
|
|
630
|
+
| Answer | Meaning |
|
|
631
|
+
| --- | --- |
|
|
632
|
+
| `401` with `invalid_token` | The Teams channel serves this URL and its credentials resolve. Teams signs its requests, so the channel refuses the unsigned probe. |
|
|
633
|
+
| `401` with `Unauthorized` | Cursor-managed hosting serves this URL and refuses the unsigned probe before the agent. |
|
|
634
|
+
| `503` with `teams_not_configured` | The server has no app id or password for this channel. Check `envPrefix` and the secrets. |
|
|
635
|
+
| `404` | No Teams channel at this path. Check the slug, the channel name, and the route path. |
|
|
636
|
+
| A redirect | A dev tunnel that needs sign-in. Run `devtunnel access create <id> --anonymous`. |
|
|
637
|
+
|
|
638
|
+
`--endpoint` must be the public `https` URL that `dev` or `channels teams forward`
|
|
639
|
+
prints. `agent-sdk dev` admits unsigned requests from loopback, so a loopback
|
|
640
|
+
probe proves nothing. Without `--endpoint`, `doctor` probes the Azure Bot's
|
|
641
|
+
messaging endpoint.
|
|
642
|
+
|
|
643
|
+
The channel's `envPrefix` owns the variable names. A new channel file reads
|
|
644
|
+
`TEAMS_APP_ID`, `TEAMS_APP_PASSWORD`, and `TEAMS_TENANT_ID`. `init --prefix
|
|
645
|
+
HELM` writes `envPrefix: "HELM"` into the new file and the names
|
|
646
|
+
`HELM_TEAMS_APP_ID`, `HELM_TEAMS_APP_PASSWORD`, and `HELM_TEAMS_TENANT_ID`. The
|
|
647
|
+
prefix must start with a letter, and each name must be a valid deployment
|
|
648
|
+
secret name. When the agent already has a Teams channel, under any file name,
|
|
649
|
+
`init` keeps it and writes the names it reads; a `--prefix` that disagrees with
|
|
650
|
+
it stops with an error. `doctor` and `package` read the names from the loaded
|
|
651
|
+
channel. Multi-agent servers need one Azure Bot per agent.
|
|
652
|
+
|
|
653
|
+
A channel that sets `credentials` in code has no env names for the CLI to
|
|
654
|
+
read. `doctor` then skips the `env`, `token`, and Azure checks and says why,
|
|
655
|
+
`package` and `init` stop with an error, and `doctor` still probes
|
|
656
|
+
`--endpoint`.
|
|
657
|
+
|
|
542
658
|
### Test GitHub webhooks {#github}
|
|
543
659
|
|
|
544
660
|
```text
|
package/docs/reference/limits.md
CHANGED
|
@@ -5,12 +5,12 @@ description: "How many deployments and deploys a team can have on Cursor-managed
|
|
|
5
5
|
|
|
6
6
|
# Limits
|
|
7
7
|
|
|
8
|
-
Cursor caps deployments for
|
|
8
|
+
Cursor caps deployments for every team. These are the default values.
|
|
9
9
|
|
|
10
10
|
| Limit | Default | What counts |
|
|
11
11
|
| --- | --- | --- |
|
|
12
|
-
| `owner.deployments` | 20 | Each slug,
|
|
13
|
-
| `owner.deploysPerDay` | 100
|
|
12
|
+
| `owner.deployments` | 20 | Each installed slug, including a stopped slug. An uninstalled slug counts when a build from the last 2 hours is still in progress or has finished successfully. |
|
|
13
|
+
| `owner.deploysPerDay` | 100 | Each accepted deploy in a rolling 24-hour window, including a redeploy. |
|
|
14
14
|
|
|
15
15
|
The error looks like this:
|
|
16
16
|
|
|
@@ -21,7 +21,7 @@ The error looks like this:
|
|
|
21
21
|
"limit": "owner.deployments",
|
|
22
22
|
"max": 20,
|
|
23
23
|
"current": 20,
|
|
24
|
-
"docsUrl": "https://cursor.com/docs/
|
|
24
|
+
"docsUrl": "https://cursor.com/docs/agent-sdk/reference/limits"
|
|
25
25
|
}
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -95,6 +95,18 @@ const events: ChannelEventHandlers = {
|
|
|
95
95
|
In a local Slack session, a `nudge.delivered` event with no `deliveryId`
|
|
96
96
|
came from a new Slack message, not from a `send()` call.
|
|
97
97
|
|
|
98
|
+
### Steer the agent's own running turn
|
|
99
|
+
|
|
100
|
+
A tool or a channel `events` handler can add a message to the turn it runs in
|
|
101
|
+
with `ctx.steer(message, { deliveryId })`. The message lands through the
|
|
102
|
+
Cursor SDK's `Run.steer` and is recorded like a steered `send()`, with
|
|
103
|
+
`message.received` and `nudge.delivered`. It never starts a turn, opens a
|
|
104
|
+
session, or queues the message. It
|
|
105
|
+
resolves to `{ status: "steered", turnId, deliveryId }`, to `{ status: "no_turn" }`
|
|
106
|
+
when the context's turn is no longer running, or to
|
|
107
|
+
`{ status: "not_delivered", reason }` when the running turn didn't take the
|
|
108
|
+
message.
|
|
109
|
+
|
|
98
110
|
## Stream events
|
|
99
111
|
|
|
100
112
|
Each NDJSON line is a `{ type, index, sessionId, turnId?, at, data }`
|
|
@@ -107,6 +119,7 @@ ISO-8601 timestamp.
|
|
|
107
119
|
| Input | `message.received`, `nudge.delivered` | A prompt was accepted or reached a running turn. Both carry [delivery IDs](#track-which-follow-up-reached-the-agent) |
|
|
108
120
|
| Turn | `turn.queued`, `turn.started`, `turn.completed`, `turn.failed` | Queueing under [`maxRunningTurns`](./agent-config.md#concurrency), then status, result, and token usage |
|
|
109
121
|
| Steps | `step.started`, `step.completed` | Model step boundaries and duration |
|
|
122
|
+
| Model calls | `model_call.completed` | One model call's token usage, as soon as the call finishes. Needs a Cursor SDK that reports per-call usage |
|
|
110
123
|
| Reasoning | `reasoning.appended`, `reasoning.completed` | Streamed reasoning blocks |
|
|
111
124
|
| Reply | `message.appended`, `message.completed` | Text deltas and finished assistant messages |
|
|
112
125
|
| Tools | `actions.requested`, `actions.completed`, `action.result`, `action.tool_retry` | Tool names, arguments, outputs, and errors. `action.tool_retry` marks a read retried after a transient failure |
|
package/docs/troubleshooting.md
CHANGED
|
@@ -54,6 +54,7 @@ Start with three checks:
|
|
|
54
54
|
| The deployment never reaches `running` | Run `agent-sdk deployment get <slug>`, and fix the error it reports. |
|
|
55
55
|
| A secret or egress change has no effect | Confirm the name with `secret list`, check that the `hosting` block is on the pushed ref, and redeploy. |
|
|
56
56
|
| A hosted schedule doesn't fire | Check that the deployment is running and that the schedule is in `bot/schedules/` on the deployed ref. |
|
|
57
|
+
| The startup log shows `requires CURSOR_API_KEY` | This is expected. See [Startup runs before secrets are available](./deployment.md#startup-runs-before-secrets-are-available). |
|
|
57
58
|
| A custom route returns `429` | Wait for the time in `Retry-After`, then send it again. |
|
|
58
59
|
|
|
59
60
|
## GitHub deliveries fail
|
|
@@ -73,6 +74,26 @@ Start with three checks:
|
|
|
73
74
|
| `slack create` waits for workspace approval | Keep the CLI running and open the **Request approval** link it prints. After an admin approves, select **Retry** in the [Deployed Agents](https://cursor.com/dashboard/deployed-agents) **Add Slack** wizard. |
|
|
74
75
|
| The bot ignores ordinary channel posts | Configure `engagement.channelPosts`, create the app with `--channel-posts`, and invite it to each allowed channel. |
|
|
75
76
|
|
|
77
|
+
## Teams does not respond
|
|
78
|
+
|
|
79
|
+
| What you see | What to do |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `channels teams doctor` fails the `token` check | Copy the **Microsoft App ID** and **App Tenant ID** from the Azure Bot's **Configuration** page, create a new client secret, and run `agent-sdk channels teams init` again. |
|
|
82
|
+
| `channels teams doctor` fails the `endpoint` check with `teams_not_configured` | The server that serves the URL has no app id or password for this channel. Check the channel's `envPrefix` and the secrets on that server. |
|
|
83
|
+
| `channels teams doctor` fails the `endpoint` check with a `404`, or says the URL is not this channel's endpoint | The URL has the wrong path. Use the endpoint that `dev` printed. It ends in `/v1/channels/<channel>`, plus the channel's `path` when it sets one. |
|
|
84
|
+
| `channels teams doctor` fails the `bot-tenant` check | The Azure Bot must be **Single Tenant**, in the tenant that the channel's tenant id variable holds. Create a Single Tenant Azure Bot in your own tenant, then run `agent-sdk channels teams init` with its ids. |
|
|
85
|
+
| `channels teams doctor` skips `bot-tenant`, `bot-endpoint`, and `teams-channel` | The Azure CLI is missing or not logged in. Install it and run `az login`. |
|
|
86
|
+
| `channels teams doctor` fails `bot-tenant`, `bot-endpoint`, and `teams-channel` with no Azure Bot found | No Azure Bot in the current subscription has the app id. Check the app id, or select the bot's subscription with `az account set`. |
|
|
87
|
+
| `channels teams doctor` fails the `bot-endpoint` check | Set the endpoint that `dev` printed on the Azure Bot: **Configuration**, **Messaging endpoint**, **Apply**. |
|
|
88
|
+
| `channels teams doctor` fails the `teams-channel` check | On the Azure Bot, open **Channels**, select **Microsoft Teams**, then select **Apply**. |
|
|
89
|
+
| `agent-sdk dev` prints `warning: Teams tunnel: cloudflared is not installed` | Install `cloudflared`, put it on `PATH`, and restart `dev`. |
|
|
90
|
+
| `agent-sdk dev --tunnel devtunnel` prints `devtunnel is not logged in` | Run `devtunnel user login`, or `devtunnel user login -g` for a GitHub account, and restart `dev`. |
|
|
91
|
+
| `agent-sdk dev --tunnel devtunnel` says the dev tunnel also publishes another port | `devtunnel host` publishes every port on the tunnel. Remove the other port with `devtunnel port delete <id> -p <port>`, or pass another `--tunnel-id`. |
|
|
92
|
+
| The bot stops answering after you restart `dev` | The cloudflared URL changed. Set the endpoint that `dev` printed on the Azure Bot again, or start `dev` with `--tunnel devtunnel` to keep one URL. |
|
|
93
|
+
| The bot cannot be added to a team or group chat | Upload the app package: run `agent-sdk channels teams package`, then in Teams select **Apps**, **Manage your apps**, **Upload an app**. |
|
|
94
|
+
|
|
95
|
+
See [Configure Microsoft Teams](./reference/cli.md#teams) for the commands.
|
|
96
|
+
|
|
76
97
|
## MCP authorization fails
|
|
77
98
|
|
|
78
99
|
| What you see | What to do |
|