@grok/agent-sdk 0.6.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/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.lt-BYgI2.js → app.Ch-048af.js} +4 -4
- package/dist/docs/assets/changelog.md.SoN0MK7o.js +1 -0
- package/dist/docs/assets/{changelog.md.DVNB-ApU.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.v_dV4U2Q.js → VPLocalSearchBox.D7BIa9Su.js} +2 -2
- package/dist/docs/assets/chunks/{arc.5o92kOg5.js → arc.BIzu7OVF.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.C-oTwnNq.js → architectureDiagram-Q4EWVU46.DNznI0Sn.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.zJ-VNOib.js → baseUniq.B4y6Y5eG.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.B9ZJZuPd.js → blockDiagram-DXYQGD6D.BudnBsgw.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BBMwSIaN.js → c4Diagram-AHTNJAMY._bB00GdB.js} +1 -1
- package/dist/docs/assets/chunks/channel.CgxlmuBS.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.D8qAJpDD.js → chunk-4BX2VUAB.CRftnUwS.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.B8QR5cdE.js → chunk-4TB4RGXK.CSx1x2Ob.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.BsWxVuew.js → chunk-55IACEB6.KkLHAAbH.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.BeGygY_i.js → chunk-EDXVE4YY.DDeKCCtX.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DdwgH-ZH.js → chunk-FMBD7UC4.DrLlsD9m.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.B9zC_ALe.js → chunk-OYMX7WX6.DeVYOGcT.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BIxJ0rcL.js → chunk-QZHKN3VN.Cz4_bS6p.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.qiM_23_f.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.BKB971D5.js → cose-bilkent-S5V4N54A.3d8hflz6.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.CcILjJgp.js → dagre-KV5264BT.BVEgjiPg.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DkY9A0nu.js → diagram-5BDNPKRD.j7dZpUK_.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.BbdzmjMt.js → diagram-G4DWMVQ6.4flIgIon.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.Be0zy1cM.js → diagram-MMDJMWI5.BlJiFh-S.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.zOiEycLe.js → diagram-TYMM5635.DHAOHEyM.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.DUd_9HMF.js → erDiagram-SMLLAGMA.DkmyG7xK.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.2KPYoZBO.js → flowDiagram-DWJPFMVM.L_WiaAU6.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.DqE8_YpP.js → ganttDiagram-T4ZO3ILL.CT6kOI2a.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CO0Tk47h.js → gitGraphDiagram-UUTBAWPF.D8CRlLqh.js} +1 -1
- package/dist/docs/assets/chunks/{graph.CNe5KbNy.js → graph.CdOyJvsX.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.BBhJ1X1B.js → infoDiagram-42DDH7IO.DcmXeSos.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.KSIw9w3I.js → ishikawaDiagram-UXIWVN3A.BBjY4mxr.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BN2Y5oUJ.js → journeyDiagram-VCZTEJTY.BrXteAB6.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.2KFuDYn_.js → kanban-definition-6JOO6SKY.OlHsUJVV.js} +1 -1
- package/dist/docs/assets/chunks/{layout.Demb_pzL.js → layout.DDwvoQlY.js} +1 -1
- package/dist/docs/assets/chunks/{linear.kYKxzbbR.js → linear.BRXPDWj3.js} +1 -1
- package/dist/docs/assets/chunks/{min.DwmCN5dF.js → min.3YwC0t3o.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.CGlz01QG.js → mindmap-definition-QFDTVHPH.mPHnT2lN.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.n3qsq4nA.js → pieDiagram-DEJITSTG.DEK2--em.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.CGNJ1GSb.js → quadrantDiagram-34T5L4WZ.NCdRAOzK.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.VhAzHDwQ.js → requirementDiagram-MS252O5E.DLAocFWZ.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.DmHA5pW-.js → sankeyDiagram-XADWPNL6.afIOqpyT.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23._TC1aKhg.js → sequenceDiagram-FGHM5R23.DXBjvkkE.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.B-kLjV3O.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.BaVlHHL-.js → theme.bNyH5NPA.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.CresbphV.js → timeline-definition-GMOUNBTQ.CE6S1iSb.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.CegHD8Y4.js → vennDiagram-DHZGUBPP.Blk7wb8V.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.DjCmZrUO.js → wardley-RL74JXVD.DQqE3WF8.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.BJ7s1zdZ.js → wardleyDiagram-NUSXRM2D.MUEQyRnz.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.IrEXlemI.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 +35 -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 +636 -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 +19 -1
- 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 +3 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +69 -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 +11 -2
- 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 +28 -2
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +298 -38
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +45 -4
- 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 +136 -5
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +580 -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/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 +271 -2
- package/dist/types.d.ts.map +1 -1
- package/docs/changelog.md +35 -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.DVNB-ApU.js +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DdlR-9Oe.js +0 -1
- package/dist/docs/assets/chunks/channel.CdyTxaXV.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CeUcN6TW.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CeUcN6TW.js +0 -1
- package/dist/docs/assets/chunks/clone.DpIwUbur.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.HtBkUH4J.js +0 -1
- 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-CnFd5R1_.js +0 -62
- package/dist/playground/assets/index-DNzRv6G8.css +0 -1
- /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
package/dist/docs/llms-full.txt
CHANGED
|
@@ -54,6 +54,41 @@ Source: /docs/changelog.md
|
|
|
54
54
|
|
|
55
55
|
# Changelog
|
|
56
56
|
|
|
57
|
+
## 0.7.0 (2026-11-19)
|
|
58
|
+
|
|
59
|
+
### Minimum versions
|
|
60
|
+
|
|
61
|
+
- `@grok/agent-sdk` requires `@cursor/sdk` 1.4.2, so each model call's usage arrives as a `model_call.completed` event.
|
|
62
|
+
|
|
63
|
+
### Behavior changes
|
|
64
|
+
|
|
65
|
+
- The `[cloud agent stopped]` wake message now holds only the agent id and its status, and tells the model to call `cloud__get` to read the agent's `result`. It no longer holds the agent's details.
|
|
66
|
+
- On Cursor hosting, a cloud agent that a `cursor-cloud-agents` conversation launched wakes that conversation once when its run stops. This includes a run that someone else cancelled. Nothing polls the agent. If no wake comes, ask the bot to check the agent. A stop in the middle of a turn does not wake the conversation yet.
|
|
67
|
+
- Launches off Cursor hosting, from a mount that sets its own `apiKey`, or with `envVars` are not watched, and return `watching: false`. A launch that Cursor hosting cannot watch also returns `watching: false`. Before, the stop watch polled the agent every minute.
|
|
68
|
+
- A wake that reached no session, such as a failed session restore or a busy session, is sent again every minute, up to 10 times.
|
|
69
|
+
- With a `skills` callback, the skills index lists only the discovered skills available in the mounted tree, rechecked each turn. Skills whose availability check fails are left out.
|
|
70
|
+
|
|
71
|
+
### New
|
|
72
|
+
|
|
73
|
+
- `teamsChannel()` from `@grok/agent-sdk/channels/teams` connects an Azure Bot that you own to Microsoft Teams personal chats, group chats, and channel posts. It runs under `agent-sdk dev` and `agent-sdk serve`. The `agent-sdk channels teams` commands store the bot's credentials, build the Teams app package, and check the setup.
|
|
74
|
+
- `teamsChannel()` reacts with 👀 (`1f440_eyes`) to each accepted inbound message when its turn starts. Set `reply.ack` to another Teams reaction id to change the reaction, or to `false` to turn it off for the channel. Return `quiet: true` from an `onAppMention`, `onDirectMessage`, or `onChannelPost` handler to start that message's turn without the reaction.
|
|
75
|
+
- `ctx.steer(message, { deliveryId })` on channel event and hook contexts (`SessionContext`) and on tool contexts (`ToolContext`) adds a message to the agent's own running turn through `Run.steer`. It never starts a turn, opens a session, or queues the message: it resolves to `steered`, `no_turn`, or `not_delivered`.
|
|
76
|
+
- `getCloudAgent` from `@grok/agent-sdk/extensions/cursor-cloud-agents` and the `cloud__get` tool return `result`, the final answer of the agent's latest run, once the agent has stopped and that run finished. An errored or expired run has no `result`. Use it to read a cloud agent's report or JSON from your own code. For a stopped agent, they also read the latest run from the Cloud Agents API, and fail if that read fails.
|
|
77
|
+
- `ReminderHostApi.fireNow(id)` fires an armed reminder as soon as the platform can, through its normal claim.
|
|
78
|
+
- `Extension.namespace` is the namespace an agent mounted the extension under, for a tree that names its own `<ns>__<name>` contributions.
|
|
79
|
+
- `ReminderHostApi.createRequest(input)` returns the request that `create` would send, validated the same way, without creating the reminder.
|
|
80
|
+
- `launchCloudAgent` takes an optional `agentId`. Pass the same id again to retry a launch that timed out or failed: when the first launch created the agent, you get that agent and no second agent starts. A launch with `cloud.envVars` cannot take an `agentId`.
|
|
81
|
+
|
|
82
|
+
### Fixes
|
|
83
|
+
|
|
84
|
+
- On Cursor hosting, a retried delivery continues on the cloud agent that its first attempt created, even when that attempt stopped before it recorded the agent. Before, the retry launched a second cloud agent that did the same work. A retry of a cancelled cloud run stays cancelled. An agent that sets `cloud.envVars` can still start a second cloud agent on a retry.
|
|
85
|
+
- On Cursor hosting, `host.reminders.dispatch()` runs the reminder's handler once. Before, it failed with HTTP 405, and the handler ran again at the reminder's fire time.
|
|
86
|
+
- The CLI writes stored credentials, MCP OAuth tokens, and `.env.local` so that only your user can read them. It narrows files that earlier versions wrote the next time it reads them.
|
|
87
|
+
- In Slack, images in a reply that arrives while a turn runs reach the follow-up turn. Before, only the reply's text did.
|
|
88
|
+
- In Slack, a file that the agent can't attach is named in the prompt with the reason, instead of dropped without a word. Files shared from another workspace now download, and a video sends its poster frame as an image.
|
|
89
|
+
- In Slack, channel, user, and user group mentions that arrive without a label reach the model as names. Before, an unlabeled channel mention read as `#channel`. Private channels and DMs show their id.
|
|
90
|
+
- On an HTTP 403, `agent-sdk deploy` prints the server's reason instead of guessing a cause.
|
|
91
|
+
|
|
57
92
|
## 0.6.0 (2026-11-03)
|
|
58
93
|
|
|
59
94
|
### Minimum versions
|
|
@@ -297,6 +332,16 @@ the deployment watches only its GitHub source repository. Run
|
|
|
297
332
|
Sessions, `ctx.host.kv`, and `ctx.host.files` survive restarts and
|
|
298
333
|
redeploys. Anything else the agent writes to disk can disappear.
|
|
299
334
|
|
|
335
|
+
## Startup runs before secrets are available
|
|
336
|
+
|
|
337
|
+
A hosted deploy starts your agent once to take a snapshot, before its
|
|
338
|
+
secrets, including `CURSOR_API_KEY`, are available. They arrive when a
|
|
339
|
+
session starts.
|
|
340
|
+
Do not call the Cursor API, hosted storage, or reminders at startup. Call
|
|
341
|
+
them from a handler. Startup log lines such as `requires CURSOR_API_KEY
|
|
342
|
+
(deployment pod credential on Cursor hosting)` come from this step and are
|
|
343
|
+
expected.
|
|
344
|
+
|
|
300
345
|
## Self-host securely
|
|
301
346
|
|
|
302
347
|
Run Agent SDK under Node 22.13 or newer, never Bun. One process can serve
|
|
@@ -884,6 +929,53 @@ caller uses the same bearer token, the extension treats them all as one person.
|
|
|
884
929
|
Use [authored auth](/docs/reference/channels.md#auth-policies) to keep callers
|
|
885
930
|
apart.
|
|
886
931
|
|
|
932
|
+
When a cloud agent the conversation launched stops, the extension wakes that
|
|
933
|
+
conversation once. The wake message gives the agent id and its status, and
|
|
934
|
+
tells the model to call `cloud__get`. That tool returns the agent's `result`,
|
|
935
|
+
the final answer of its latest run.
|
|
936
|
+
|
|
937
|
+
On Cursor hosting, the wake comes when the agent's run stops. This includes a
|
|
938
|
+
run that someone else cancels. If the wake does not reach the conversation,
|
|
939
|
+
the extension tries again every minute, up to 10 times. You configure nothing
|
|
940
|
+
for this.
|
|
941
|
+
|
|
942
|
+
Nothing polls the agent. If no wake comes, ask the bot to check the agent with
|
|
943
|
+
`cloud__get`. A stop in the middle of a turn does not wake the conversation
|
|
944
|
+
yet. The extension stops waiting for a wake after 24 hours.
|
|
945
|
+
|
|
946
|
+
Some launches get no wake: launches off Cursor hosting, launches from a mount
|
|
947
|
+
that sets its own `apiKey`, and launches with `envVars`. A launch that Cursor
|
|
948
|
+
hosting cannot watch also gets no wake. For these launches, the launch result
|
|
949
|
+
says `watching: false`. Ask the bot to check the agent when you need its
|
|
950
|
+
result.
|
|
951
|
+
|
|
952
|
+
## Read a result from your code
|
|
953
|
+
|
|
954
|
+
Your own code, such as a tool or a reminder, can launch a cloud agent with
|
|
955
|
+
`launchCloudAgent` and read it back with `getCloudAgent`. When the agent has
|
|
956
|
+
stopped and its latest run finished, `result` holds the final answer of that
|
|
957
|
+
run. An errored or expired run has no `result`. Ask the agent to end with its
|
|
958
|
+
report or its JSON, and parse `result`.
|
|
959
|
+
|
|
960
|
+
```ts
|
|
961
|
+
import { getCloudAgent } from "@grok/agent-sdk/extensions/cursor-cloud-agents";
|
|
962
|
+
|
|
963
|
+
const agent = await getCloudAgent(agentId);
|
|
964
|
+
if (agent.status === "finished" && agent.result !== undefined) {
|
|
965
|
+
const report = JSON.parse(agent.result);
|
|
966
|
+
}
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
`getCloudAgent` does not check who launched the agent. Pass only ids that your
|
|
970
|
+
code launched, never an id that a model chose.
|
|
971
|
+
|
|
972
|
+
`launchCloudAgent` takes an optional `agentId`, a `bc-<uuid>`. When you omit
|
|
973
|
+
it, the extension makes one. To retry a launch that timed out or failed, pass
|
|
974
|
+
the same `agentId` again. If the first launch created the agent, you get that
|
|
975
|
+
agent back and no second agent starts. The extension returns an existing agent
|
|
976
|
+
only when this principal launched it through the extension. A launch with
|
|
977
|
+
`cloud.envVars` cannot take an `agentId`.
|
|
978
|
+
|
|
887
979
|
## Configure it
|
|
888
980
|
|
|
889
981
|
| Option | What it controls |
|
|
@@ -2622,6 +2714,395 @@ follow the `agent-sdk-setup-slack` skill for installation and tokens.
|
|
|
2622
2714
|
|
|
2623
2715
|
---
|
|
2624
2716
|
|
|
2717
|
+
Source: /docs/guides/teams.md
|
|
2718
|
+
|
|
2719
|
+
# Microsoft Teams agents
|
|
2720
|
+
|
|
2721
|
+
A Teams agent wakes when someone @mentions it in a channel or group chat,
|
|
2722
|
+
messages it in a personal chat, or posts in a channel it watches. It
|
|
2723
|
+
answers in the same reply chain. `teamsChannel()` takes the same engagement options as
|
|
2724
|
+
`slackChannel()`, so an agent that already runs in Slack can run in Teams
|
|
2725
|
+
with the same shape of config.
|
|
2726
|
+
|
|
2727
|
+
The agent answers as an Azure Bot that you register and own. Teams sends
|
|
2728
|
+
each message to the bot's messaging endpoint, and the channel checks the
|
|
2729
|
+
Bot Framework token on every request before it starts a turn.
|
|
2730
|
+
|
|
2731
|
+
## Set up with the CLI
|
|
2732
|
+
|
|
2733
|
+
The `agent-sdk channels teams` commands do every step except the clicks in
|
|
2734
|
+
the Azure portal and in Teams:
|
|
2735
|
+
|
|
2736
|
+
```bash
|
|
2737
|
+
agent-sdk channels teams setup
|
|
2738
|
+
printf %s "$CLIENT_SECRET" | agent-sdk channels teams init --dir ./helm \
|
|
2739
|
+
--app-id <microsoft-app-id> --tenant-id <app-tenant-id>
|
|
2740
|
+
agent-sdk channels teams package --dir ./helm
|
|
2741
|
+
agent-sdk dev ./helm
|
|
2742
|
+
agent-sdk channels teams doctor --dir ./helm --endpoint <printed URL>
|
|
2743
|
+
```
|
|
2744
|
+
|
|
2745
|
+
1. `setup` prints the Azure portal steps in
|
|
2746
|
+
[Register the Azure Bot](#register-the-azure-bot).
|
|
2747
|
+
2. `init` writes `bot/channels/teams.ts` and puts the app id, the client
|
|
2748
|
+
secret, and the tenant id in `.env.local`. It reads the secret from a
|
|
2749
|
+
hidden prompt or stdin, never from an argument.
|
|
2750
|
+
3. `package` writes `helm-teams-app.zip`. Upload it in Teams, as
|
|
2751
|
+
[Install the bot in Teams](#install-the-bot-in-teams) describes.
|
|
2752
|
+
4. `dev` opens a tunnel and prints the messaging endpoint. Set it on the
|
|
2753
|
+
Azure Bot.
|
|
2754
|
+
5. `doctor` checks the env names, the token, the Azure Bot, and the
|
|
2755
|
+
endpoint, and names the part that fails.
|
|
2756
|
+
|
|
2757
|
+
The [CLI reference](/docs/reference/cli.md#teams) lists every flag. The rest of
|
|
2758
|
+
this guide explains what the commands write and how the channel behaves.
|
|
2759
|
+
|
|
2760
|
+
## Answer a mention or personal chat
|
|
2761
|
+
|
|
2762
|
+
```ts
|
|
2763
|
+
// bot/channels/teams.ts
|
|
2764
|
+
import { teamsChannel } from "@grok/agent-sdk/channels/teams";
|
|
2765
|
+
|
|
2766
|
+
export default teamsChannel();
|
|
2767
|
+
```
|
|
2768
|
+
|
|
2769
|
+
By default the agent answers @mentions in channels and group chats, and
|
|
2770
|
+
every message in a personal chat. While a turn runs, Teams shows the
|
|
2771
|
+
typing indicator, and the reply arrives as one message in the reply chain.
|
|
2772
|
+
In a channel, each reply chain is its own conversation. A personal chat
|
|
2773
|
+
and a group chat have no reply chains, so each one is a single
|
|
2774
|
+
conversation.
|
|
2775
|
+
|
|
2776
|
+
The channel reads three variables:
|
|
2777
|
+
|
|
2778
|
+
| Variable | Value |
|
|
2779
|
+
| --- | --- |
|
|
2780
|
+
| `TEAMS_APP_ID` | The Azure Bot's Microsoft App ID |
|
|
2781
|
+
| `TEAMS_APP_PASSWORD` | A client secret of that app registration |
|
|
2782
|
+
| `TEAMS_TENANT_ID` | Required. The home tenant of your single-tenant Azure Bot |
|
|
2783
|
+
|
|
2784
|
+
The Azure Bot is a single-tenant bot in your own tenant, because Azure
|
|
2785
|
+
does not create new multi-tenant bots after July 31, 2025. The channel
|
|
2786
|
+
mints its Bot Connector token in that tenant and ignores activities from
|
|
2787
|
+
any other tenant. To run several
|
|
2788
|
+
agents in one `agent-sdk dev`, give each its own bot and an `envPrefix`.
|
|
2789
|
+
`channels teams init --prefix HELPDESK` writes it for you. The prefix
|
|
2790
|
+
starts with a letter.
|
|
2791
|
+
|
|
2792
|
+
```ts
|
|
2793
|
+
export default teamsChannel({ envPrefix: "HELPDESK" });
|
|
2794
|
+
// HELPDESK_TEAMS_APP_ID, HELPDESK_TEAMS_APP_PASSWORD, HELPDESK_TEAMS_TENANT_ID
|
|
2795
|
+
```
|
|
2796
|
+
|
|
2797
|
+
The channel file owns these names. When the file exists, `init` writes the
|
|
2798
|
+
names it reads, and `doctor` and `package` read them from the loaded
|
|
2799
|
+
channel.
|
|
2800
|
+
|
|
2801
|
+
## Register the Azure Bot
|
|
2802
|
+
|
|
2803
|
+
1. In the Azure portal, create an **Azure Bot** resource. Set **Type of
|
|
2804
|
+
App** to **Single Tenant** and **Creation type** to **Create new
|
|
2805
|
+
Microsoft App ID**.
|
|
2806
|
+
2. Open the bot's **Configuration** page. Copy **Microsoft App ID** and
|
|
2807
|
+
**App Tenant ID**. `init` takes them as `--app-id` and `--tenant-id`.
|
|
2808
|
+
3. From **Configuration**, open **Manage Password**, add a client secret,
|
|
2809
|
+
and copy its value. Azure shows the value once. `init` reads it from
|
|
2810
|
+
the hidden prompt or stdin.
|
|
2811
|
+
4. Under **Channels**, add **Microsoft Teams**.
|
|
2812
|
+
5. Set **Messaging endpoint** to the URL in
|
|
2813
|
+
[Messaging endpoint](#messaging-endpoint), or for a hosted deploy, the
|
|
2814
|
+
URL in [Deploy](#deploy).
|
|
2815
|
+
|
|
2816
|
+
## Install the bot in Teams
|
|
2817
|
+
|
|
2818
|
+
Teams installs a bot from an app package: a zip of `manifest.json` and two
|
|
2819
|
+
icons. `agent-sdk channels teams package` builds it from the channel. The
|
|
2820
|
+
`bots` entry names the Azure Bot by its app ID and the places people can
|
|
2821
|
+
talk to it:
|
|
2822
|
+
|
|
2823
|
+
```json
|
|
2824
|
+
{
|
|
2825
|
+
"id": "<TEAMS_APP_ID>",
|
|
2826
|
+
"bots": [
|
|
2827
|
+
{
|
|
2828
|
+
"botId": "<TEAMS_APP_ID>",
|
|
2829
|
+
"scopes": ["personal", "team", "groupChat"],
|
|
2830
|
+
"isNotificationOnly": false
|
|
2831
|
+
}
|
|
2832
|
+
]
|
|
2833
|
+
}
|
|
2834
|
+
```
|
|
2835
|
+
|
|
2836
|
+
A full manifest also needs `manifestVersion`, `version`, `developer`,
|
|
2837
|
+
`name`, `description`, `icons`, and `accentColor`; see the
|
|
2838
|
+
[app manifest schema](https://learn.microsoft.com/microsoftteams/platform/resources/schema/manifest-schema).
|
|
2839
|
+
Upload the package in Teams under **Apps** > **Manage your apps** >
|
|
2840
|
+
**Upload an app**, or have a Teams admin publish it to your organization
|
|
2841
|
+
in the Teams admin center. Then add the app to a team, a group chat, or a
|
|
2842
|
+
personal chat.
|
|
2843
|
+
|
|
2844
|
+
## Wake on a channel post
|
|
2845
|
+
|
|
2846
|
+
Teams sends a channel post without a mention only to an app that holds
|
|
2847
|
+
the resource-specific consent permission `ChannelMessage.Read.Group`.
|
|
2848
|
+
`package` adds it when the channel sets `engagement.channelPosts`, and a
|
|
2849
|
+
team owner grants it when they add the app to the team:
|
|
2850
|
+
|
|
2851
|
+
```json
|
|
2852
|
+
{
|
|
2853
|
+
"webApplicationInfo": { "id": "<TEAMS_APP_ID>" },
|
|
2854
|
+
"authorization": {
|
|
2855
|
+
"permissions": {
|
|
2856
|
+
"resourceSpecific": [{ "name": "ChannelMessage.Read.Group", "type": "Application" }]
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
```
|
|
2861
|
+
|
|
2862
|
+
Then name the channels to watch. Copy a channel's ID from its **Get link
|
|
2863
|
+
to channel** URL: it's the `19:…@thread.tacv2` part.
|
|
2864
|
+
|
|
2865
|
+
```ts
|
|
2866
|
+
export default teamsChannel({
|
|
2867
|
+
engagement: {
|
|
2868
|
+
channelPosts: {
|
|
2869
|
+
allow: ["19:4b7c2f9e1d6a4e8f9a3b5c7d1e2f3a4b@thread.tacv2"],
|
|
2870
|
+
posts: "all",
|
|
2871
|
+
},
|
|
2872
|
+
},
|
|
2873
|
+
});
|
|
2874
|
+
```
|
|
2875
|
+
|
|
2876
|
+
Watched posts go to `onChannelPost` when you set it, the same way
|
|
2877
|
+
mentions go to `onAppMention` and personal chats to `onDirectMessage`.
|
|
2878
|
+
Return `null` from a hook to skip a message. `posts` is `"top-level"` (the
|
|
2879
|
+
default), `"replies"`, or `"all"`. Use
|
|
2880
|
+
`allow: ["*"]` to watch every channel the app is in, and
|
|
2881
|
+
`replies: "joined"` to also answer replies in any reply chain the agent
|
|
2882
|
+
already answered. Bot posts stay out unless you set `includeBotPosts: true`;
|
|
2883
|
+
the agent's own posts never start a turn.
|
|
2884
|
+
|
|
2885
|
+
To let another bot wake the agent with an @mention, list it in
|
|
2886
|
+
`engagement.botMentions.allowFrom` as `28:<its app ID>`. Each thread allows
|
|
2887
|
+
5 bot wakes an hour and 20 in total by default
|
|
2888
|
+
(`maxPerThreadPerHour`, `maxPerThreadTotal`).
|
|
2889
|
+
|
|
2890
|
+
## Stream the reply
|
|
2891
|
+
|
|
2892
|
+
```ts
|
|
2893
|
+
export default teamsChannel({ reply: { mode: "stream" } });
|
|
2894
|
+
```
|
|
2895
|
+
|
|
2896
|
+
In stream mode the agent posts one message as soon as it starts working.
|
|
2897
|
+
That message names the tool the agent is running until text arrives, then
|
|
2898
|
+
fills in as the reply grows, and it ends as the final answer. Teams limits
|
|
2899
|
+
how often a bot can edit a message, so the channel edits at most once
|
|
2900
|
+
every 1.5 seconds; set `updateIntervalMs` to change that.
|
|
2901
|
+
|
|
2902
|
+
## Approve tool calls in Teams
|
|
2903
|
+
|
|
2904
|
+
```ts
|
|
2905
|
+
export default teamsChannel({ toolApprovals: true });
|
|
2906
|
+
```
|
|
2907
|
+
|
|
2908
|
+
When a server tool with `needsApproval` is about to run, the agent posts
|
|
2909
|
+
an Adaptive Card in the thread with the tool's arguments, secrets
|
|
2910
|
+
redacted, and **Approve** and **Deny** buttons. Anyone who could continue
|
|
2911
|
+
the conversation can decide; set `policy: { respondTo: "author" }` to
|
|
2912
|
+
limit that, and follow-ups, to the person who started it. After the click,
|
|
2913
|
+
the card shows the decision and who made it.
|
|
2914
|
+
|
|
2915
|
+
For your own cards, handle other `Action.Submit` clicks in
|
|
2916
|
+
`onCardAction`, which receives the submitted data and can start a turn in
|
|
2917
|
+
the card's thread.
|
|
2918
|
+
|
|
2919
|
+
## Refuse guests and other tenants
|
|
2920
|
+
|
|
2921
|
+
By default the channel answers only members and owners of the bot's
|
|
2922
|
+
tenant. It asks Teams for the sender's role and tenant. It refuses a
|
|
2923
|
+
guest, an anonymous meeting user, or a person from another organization.
|
|
2924
|
+
This applies when they message the agent and when they click a card.
|
|
2925
|
+
**Approve** and **Deny** are card clicks. A sender with no role is
|
|
2926
|
+
refused. A sender Teams does not list is refused too.
|
|
2927
|
+
|
|
2928
|
+
The agent posts one short reply to a refused sender. It posts at most
|
|
2929
|
+
once per conversation and sender per hour. The default text is "I can
|
|
2930
|
+
only help members of this organization. Ask the agent owner to allow
|
|
2931
|
+
guests."
|
|
2932
|
+
|
|
2933
|
+
Set `policy.refusalMessage` to change the default text. Set
|
|
2934
|
+
`policy.refusalMessage` to `false` to stay silent. Silence applies to a
|
|
2935
|
+
refused sender and to a sender the lookup could not verify.
|
|
2936
|
+
|
|
2937
|
+
A failed lookup gets the reply "I couldn't verify your access, try again
|
|
2938
|
+
shortly." The agent does not reply to a card click from a refused sender.
|
|
2939
|
+
The agent ignores a card click from a bot, including a bot that
|
|
2940
|
+
`engagement.botMentions` allows. The agent does not reply to an activity
|
|
2941
|
+
from another tenant.
|
|
2942
|
+
|
|
2943
|
+
To let guests and external members in, set `blockExternals` to `false`.
|
|
2944
|
+
|
|
2945
|
+
```ts
|
|
2946
|
+
export default teamsChannel({ policy: { blockExternals: false } });
|
|
2947
|
+
```
|
|
2948
|
+
|
|
2949
|
+
```ts
|
|
2950
|
+
export default teamsChannel({
|
|
2951
|
+
policy: {
|
|
2952
|
+
refusalMessage: "Ask your team owner to add you to this organization.",
|
|
2953
|
+
},
|
|
2954
|
+
});
|
|
2955
|
+
```
|
|
2956
|
+
|
|
2957
|
+
## Welcome message
|
|
2958
|
+
|
|
2959
|
+
When someone installs the app in a conversation, the agent posts one
|
|
2960
|
+
greeting there. Teams reports the install as an `installationUpdate`
|
|
2961
|
+
activity whose action is `add`. The greeting does not start a model turn.
|
|
2962
|
+
The agent posts it once per conversation.
|
|
2963
|
+
|
|
2964
|
+
The default text is "Hi! Mention me in a channel, or message me here, to
|
|
2965
|
+
get started."
|
|
2966
|
+
|
|
2967
|
+
Set `welcome` to change the greeting. Set `welcome` to `false` to turn
|
|
2968
|
+
it off.
|
|
2969
|
+
|
|
2970
|
+
```ts
|
|
2971
|
+
export default teamsChannel({
|
|
2972
|
+
welcome: "Hi. Mention me when you want help with a laptop.",
|
|
2973
|
+
});
|
|
2974
|
+
```
|
|
2975
|
+
|
|
2976
|
+
## Messaging endpoint
|
|
2977
|
+
|
|
2978
|
+
Under `agent-sdk dev` or self-hosted `agent-sdk serve`, the Azure Bot's
|
|
2979
|
+
messaging endpoint is the server's public origin plus the channel's path:
|
|
2980
|
+
|
|
2981
|
+
```text
|
|
2982
|
+
https://<origin>/<slug>/v1/channels/<channel>
|
|
2983
|
+
```
|
|
2984
|
+
|
|
2985
|
+
`<slug>` is the agent's slug and `<channel>` is the channel file's name, so
|
|
2986
|
+
`bot/channels/teams.ts` in the `helm` agent answers at
|
|
2987
|
+
`https://<origin>/helm/v1/channels/teams`. The URL has no trailing slash.
|
|
2988
|
+
With `teamsChannel({ path: "/messages" })`, the channel appends that path:
|
|
2989
|
+
`https://<origin>/helm/v1/channels/teams/messages`. A hosted deploy has a
|
|
2990
|
+
different URL; see [Deploy](#deploy).
|
|
2991
|
+
|
|
2992
|
+
## Test locally
|
|
2993
|
+
|
|
2994
|
+
Teams reaches the bot only at a public HTTPS URL. `agent-sdk dev` opens a
|
|
2995
|
+
`cloudflared` tunnel and prints the messaging endpoint on the tunnel's
|
|
2996
|
+
origin:
|
|
2997
|
+
|
|
2998
|
+
```bash
|
|
2999
|
+
agent-sdk dev ./helm
|
|
3000
|
+
```
|
|
3001
|
+
|
|
3002
|
+
Copy the printed URL into the Azure Bot's **Messaging endpoint**, then
|
|
3003
|
+
mention the bot in Teams. `--tunnel devtunnel` keeps one URL across
|
|
3004
|
+
restarts. Next to a plain `agent-sdk serve`, `agent-sdk channels teams
|
|
3005
|
+
forward` opens the same tunnel. `agent-sdk dev --mode single` serves one agent
|
|
3006
|
+
without a slug, so its endpoint is `https://<origin>/v1/channels/teams`.
|
|
3007
|
+
Without `--mode single`, the endpoint includes the agent's slug:
|
|
3008
|
+
`https://<origin>/helm/v1/channels/teams`.
|
|
3009
|
+
|
|
3010
|
+
To run your own tunnel instead, serve with plain `agent-sdk serve`, which
|
|
3011
|
+
opens no tunnel, and point `cloudflared` at its port:
|
|
3012
|
+
|
|
3013
|
+
```bash
|
|
3014
|
+
agent-sdk serve --dir ./helm --mode single --port 3978
|
|
3015
|
+
cloudflared tunnel --url http://localhost:3978
|
|
3016
|
+
```
|
|
3017
|
+
|
|
3018
|
+
Add `--protocol http2` to `cloudflared` if your network blocks QUIC. Set the
|
|
3019
|
+
Azure Bot's **Messaging endpoint** to the printed `<public-url>` plus
|
|
3020
|
+
`/v1/channels/teams`, or `<public-url>/helm/v1/channels/teams` without
|
|
3021
|
+
`--mode single`. The built-in tunnel forwards only `POST` requests to the
|
|
3022
|
+
Teams messaging paths. A tunnel you run yourself exposes every route on the
|
|
3023
|
+
port.
|
|
3024
|
+
|
|
3025
|
+
Requests through a tunnel always get the Bot Framework token check, so only
|
|
3026
|
+
Teams can start turns there. A tunnel adds proxy headers or forwards its
|
|
3027
|
+
public hostname, and the dev exception for unsigned activities refuses both.
|
|
3028
|
+
To replay a saved activity without Teams, POST it to the same path on
|
|
3029
|
+
`http://127.0.0.1:<port>` from the same machine; `agent-sdk dev` admits
|
|
3030
|
+
unsigned activities from loopback only.
|
|
3031
|
+
|
|
3032
|
+
## Deploy
|
|
3033
|
+
|
|
3034
|
+
Hosted, the agent needs its three secrets:
|
|
3035
|
+
|
|
3036
|
+
```ts
|
|
3037
|
+
// bot/agent.ts
|
|
3038
|
+
import { defineAgent } from "@grok/agent-sdk";
|
|
3039
|
+
|
|
3040
|
+
export default defineAgent({
|
|
3041
|
+
hosting: {
|
|
3042
|
+
secretNames: ["TEAMS_APP_ID", "TEAMS_APP_PASSWORD", "TEAMS_TENANT_ID"],
|
|
3043
|
+
},
|
|
3044
|
+
});
|
|
3045
|
+
```
|
|
3046
|
+
|
|
3047
|
+
Hosting adds the Microsoft hosts that a Teams channel calls
|
|
3048
|
+
(`login.microsoftonline.com`, `login.botframework.com`, and
|
|
3049
|
+
`smba.trafficmanager.net`), so you do not list them in `egressDomains`.
|
|
3050
|
+
Your team's network settings still apply to them. If your team restricts
|
|
3051
|
+
egress, its allowlist must include all three hosts, or the agent's replies
|
|
3052
|
+
fail.
|
|
3053
|
+
|
|
3054
|
+
An `envPrefix` changes the secret names. With
|
|
3055
|
+
`teamsChannel({ envPrefix: "ECHO" })`, list `ECHO_TEAMS_APP_ID`,
|
|
3056
|
+
`ECHO_TEAMS_APP_PASSWORD`, and `ECHO_TEAMS_TENANT_ID` in `secretNames`, and
|
|
3057
|
+
set those names with `agent-sdk secret set`.
|
|
3058
|
+
|
|
3059
|
+
```bash
|
|
3060
|
+
agent-sdk deploy --dir . --slug helpdesk
|
|
3061
|
+
agent-sdk secret set helpdesk TEAMS_APP_ID
|
|
3062
|
+
agent-sdk secret set helpdesk TEAMS_APP_PASSWORD
|
|
3063
|
+
agent-sdk secret set helpdesk TEAMS_TENANT_ID
|
|
3064
|
+
```
|
|
3065
|
+
|
|
3066
|
+
`agent-sdk deploy` prints the hosted messaging endpoint on a `public:`
|
|
3067
|
+
line that ends in `/v1/channels/teams`. Set the Azure Bot's **Messaging
|
|
3068
|
+
endpoint** to that URL, not to the slug URL from local testing. With a
|
|
3069
|
+
custom `path`, add it after the printed URL.
|
|
3070
|
+
|
|
3071
|
+
On hosting, Cursor checks the Bot Framework token and the tenant before
|
|
3072
|
+
the agent starts. Activities that the channel cannot act on, such as a
|
|
3073
|
+
reaction or an unmentioned post outside `channelPosts`, stop there and
|
|
3074
|
+
use no compute. Each personal or group chat is one session, and each
|
|
3075
|
+
channel reply chain is one session. Tool approvals work on hosting: an
|
|
3076
|
+
Approve or Deny click reaches the turn that waits for it, and a call that
|
|
3077
|
+
nobody approves in 10 minutes is denied.
|
|
3078
|
+
|
|
3079
|
+
Hosting runs Teams channels only in the commercial Microsoft cloud, and
|
|
3080
|
+
only for teams that have Teams channels turned on. The deploy fails
|
|
3081
|
+
otherwise.
|
|
3082
|
+
|
|
3083
|
+
## How Teams differs from Slack
|
|
3084
|
+
|
|
3085
|
+
| | Slack | Teams |
|
|
3086
|
+
| --- | --- | --- |
|
|
3087
|
+
| App | Your Slack app's bot and app tokens | Your Azure Bot's app ID, client secret, and tenant |
|
|
3088
|
+
| Local transport | Socket Mode, no public URL | `agent-sdk dev` opens a tunnel to the messaging endpoint |
|
|
3089
|
+
| Watch channel posts | `message.channels` subscription | `ChannelMessage.Read.Group` consent at install |
|
|
3090
|
+
| Threads | Every message can start a thread | Reply chains in channels; personal and group chats are one conversation each |
|
|
3091
|
+
| Bot-to-bot wakes | `maxDepth` from message metadata, plus per-thread caps | Per-thread caps only |
|
|
3092
|
+
| Progress | Status chip, streaming API, tool and reasoning cards | Typing indicator, or one edited message in stream mode |
|
|
3093
|
+
| Approvals | Block Kit buttons | Adaptive Card buttons |
|
|
3094
|
+
| Hosted sessions | One per thread | One per chat, or one per channel reply chain |
|
|
3095
|
+
| Not available in Teams | | Reactions, file uploads and downloads, suggested prompts, `eval` commands, edit debounce |
|
|
3096
|
+
|
|
3097
|
+
## Related
|
|
3098
|
+
|
|
3099
|
+
- [Slack](/docs/guides/slack.md)
|
|
3100
|
+
- [Webhooks](/docs/guides/webhooks.md)
|
|
3101
|
+
- [Deployment](/docs/deployment.md)
|
|
3102
|
+
- [Channels reference](/docs/reference/channels.md)
|
|
3103
|
+
|
|
3104
|
+
---
|
|
3105
|
+
|
|
2625
3106
|
Source: /docs/guides/webhooks.md
|
|
2626
3107
|
|
|
2627
3108
|
# Webhook agents
|
|
@@ -3764,6 +4245,7 @@ Import each one from `@grok/agent-sdk/channels/<name>`.
|
|
|
3764
4245
|
| Function | Details |
|
|
3765
4246
|
| --- | --- |
|
|
3766
4247
|
| `slackChannel()` | [Slack](/docs/guides/slack.md) |
|
|
4248
|
+
| `teamsChannel()` | [Microsoft Teams](/docs/guides/teams.md) |
|
|
3767
4249
|
| `githubChannel()` | [GitHub](/docs/guides/github.md) |
|
|
3768
4250
|
| `gitlabChannel()` | [GitLab](/docs/guides/gitlab.md) |
|
|
3769
4251
|
| `bitbucketChannel()` | [Bitbucket](/docs/guides/bitbucket.md) |
|
|
@@ -3874,6 +4356,7 @@ command remains available.
|
|
|
3874
4356
|
| [`mcp serve`, `mcp install`](#mcp) | Connect an MCP client to an agent |
|
|
3875
4357
|
| [`mcp oauth`](#mcp-oauth) | Authorize an MCP connection |
|
|
3876
4358
|
| [`slack`](#slack) | Provision and check Slack channel apps |
|
|
4359
|
+
| [`teams`](#teams) | Connect, check, and package a Microsoft Teams bot |
|
|
3877
4360
|
| [`github`](#github) | Forward, replay, and inspect GitHub webhooks |
|
|
3878
4361
|
| [`gitlab`, `bitbucket`, `pagerduty`](#replay-other-webhooks) | Replay and inspect GitLab, Bitbucket, or PagerDuty webhooks |
|
|
3879
4362
|
|
|
@@ -3939,6 +4422,12 @@ agent-sdk dev ./agent-sdk-pr-reviewer --port 3000
|
|
|
3939
4422
|
It accepts every `serve` option. Don't combine the path with a different
|
|
3940
4423
|
`--dir`.
|
|
3941
4424
|
|
|
4425
|
+
When an agent has a Microsoft Teams channel, `dev` also opens a cloudflared
|
|
4426
|
+
quick tunnel and prints that channel's messaging endpoint. Pass
|
|
4427
|
+
`--tunnel devtunnel` for an endpoint that stays the same across restarts, and
|
|
4428
|
+
`--tunnel-id <id>` to pick the dev tunnel. See
|
|
4429
|
+
[Configure Microsoft Teams](#teams).
|
|
4430
|
+
|
|
3942
4431
|
### Serve the docs {#docs}
|
|
3943
4432
|
|
|
3944
4433
|
```text
|
|
@@ -4343,6 +4832,115 @@ token prefix defaults to the project directory name in upper snake case.
|
|
|
4343
4832
|
`--channel-posts` adds the message events that `engagement.channelPosts`
|
|
4344
4833
|
needs. See [Slack](/docs/guides/slack.md) for manual setup.
|
|
4345
4834
|
|
|
4835
|
+
### Configure Microsoft Teams {#teams}
|
|
4836
|
+
|
|
4837
|
+
```text
|
|
4838
|
+
agent-sdk channels teams setup
|
|
4839
|
+
agent-sdk channels teams init --app-id <guid> --tenant-id <guid> [--dir <path>]
|
|
4840
|
+
[--prefix <prefix>] [--dry-run] [--json]
|
|
4841
|
+
agent-sdk channels teams doctor [--dir <path>] [--slug <slug>] [--channel <id>]
|
|
4842
|
+
[--endpoint <url>] [--json]
|
|
4843
|
+
agent-sdk channels teams package [--dir <path>] [--slug <slug>] [--channel <id>]
|
|
4844
|
+
[--name <name>] [--icon <png>] [--app-version <x.y.z>] [--endpoint <url>]
|
|
4845
|
+
[--out <file>] [--dry-run] [--json]
|
|
4846
|
+
agent-sdk channels teams forward [--dir <path>] [--slug <slug>] [--channel <id>]
|
|
4847
|
+
[--host <host>] [--port <n>] [--tunnel cloudflared|devtunnel]
|
|
4848
|
+
[--tunnel-id <id>] [--json]
|
|
4849
|
+
```
|
|
4850
|
+
|
|
4851
|
+
| Subcommand | Contract |
|
|
4852
|
+
| --- | --- |
|
|
4853
|
+
| `setup` | Print the Azure Bot setup steps without changing files. |
|
|
4854
|
+
| `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. |
|
|
4855
|
+
| `doctor` | Run the checks below and exit `1` when one fails. A check it can't run is skipped and says why. |
|
|
4856
|
+
| `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**. |
|
|
4857
|
+
| `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. |
|
|
4858
|
+
|
|
4859
|
+
`agent-sdk dev` opens the same tunnel by itself. The endpoint is the tunnel
|
|
4860
|
+
origin plus `/<slug>/v1/channels/<channel>`, such as
|
|
4861
|
+
`https://<random>.trycloudflare.com/helm/v1/channels/teams`. Set it as the
|
|
4862
|
+
Azure Bot's messaging endpoint. The tunnel forwards only `POST` requests to
|
|
4863
|
+
the Teams messaging paths, so the rest of the agent's API stays local. Every
|
|
4864
|
+
other request on the tunnel host gets a `404`.
|
|
4865
|
+
|
|
4866
|
+
`--tunnel` picks the tunnel for `dev` and `channels teams forward`:
|
|
4867
|
+
|
|
4868
|
+
| `--tunnel` | Needs | Endpoint |
|
|
4869
|
+
| --- | --- | --- |
|
|
4870
|
+
| `cloudflared` (default) | `cloudflared` on `PATH`. No account. | A new `trycloudflare.com` URL on every start. Set it on the bot again after each restart. |
|
|
4871
|
+
| `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. |
|
|
4872
|
+
|
|
4873
|
+
With `devtunnel`, the first start creates a dev tunnel that allows anonymous
|
|
4874
|
+
access, adds port `3978`, and saves the tunnel id as `TEAMS_DEVTUNNEL_ID` in
|
|
4875
|
+
`.env.local`. Later starts reuse that tunnel. `--tunnel-id <id>` picks the id.
|
|
4876
|
+
Microsoft deletes a dev tunnel after 30 days without use, and the next start
|
|
4877
|
+
creates it again under the same id. Port `3978` belongs to the tunnel, so
|
|
4878
|
+
`--port 3978` with `--tunnel devtunnel` stops with a usage error. Run the agent
|
|
4879
|
+
on another port. `devtunnel host` publishes every port on the tunnel, so the
|
|
4880
|
+
tunnel stops when it reports a port other than `3978`. Remove that port with
|
|
4881
|
+
`devtunnel port delete <id> -p <port>`, or pass another `--tunnel-id`.
|
|
4882
|
+
|
|
4883
|
+
The package manifest uses Teams manifest version 1.25. It names the bot by
|
|
4884
|
+
its app id and lists the scopes the channel answers in: mentions add `team`
|
|
4885
|
+
and `groupChat`, and personal chats add `personal`. With
|
|
4886
|
+
`engagement.channelPosts`, it also asks for `ChannelMessage.Read.Group`
|
|
4887
|
+
consent. `--endpoint` adds the messaging endpoint's host to `validDomains`.
|
|
4888
|
+
`--app-version` sets the app version. It defaults to `1.<YYYYMMDD>.<second of
|
|
4889
|
+
the day>` in UTC, so each new zip is higher than the last, and Teams and the
|
|
4890
|
+
Teams admin center accept it as an update. Teams refuses an update whose
|
|
4891
|
+
version is not higher than the installed one. After you set
|
|
4892
|
+
`--app-version 2.0.0`, a later default `1.x` version is lower, so keep passing
|
|
4893
|
+
a higher `--app-version`. The default's middle part has 8 digits, which is fine
|
|
4894
|
+
for a bot-only app. An app that adds an Office Add-in limits each part to 5
|
|
4895
|
+
digits.
|
|
4896
|
+
|
|
4897
|
+
`doctor` runs these checks in order:
|
|
4898
|
+
|
|
4899
|
+
| Check | Passes when |
|
|
4900
|
+
| --- | --- |
|
|
4901
|
+
| `env` | The app id, password, and tenant id variables are set. |
|
|
4902
|
+
| `token` | Microsoft Entra issues a Bot Framework token for the app within 10 seconds. |
|
|
4903
|
+
| `bot-tenant` | The Azure Bot is **Single Tenant** and its tenant is the one in the channel's tenant id variable. |
|
|
4904
|
+
| `bot-endpoint` | The Azure Bot's messaging endpoint is `--endpoint`. Without `--endpoint`, it reports the bot's endpoint. |
|
|
4905
|
+
| `teams-channel` | The Azure Bot's Microsoft Teams channel is added and on. |
|
|
4906
|
+
| `endpoint` | The endpoint's path names this channel, and an unsigned `POST` to it gets `401`. |
|
|
4907
|
+
|
|
4908
|
+
The three Azure checks need the Azure CLI, logged in with `az login`, on any
|
|
4909
|
+
operating system. Without it they are skipped. When no Azure Bot in the
|
|
4910
|
+
current subscription has the app id, they fail. Each `az` call has a time
|
|
4911
|
+
limit. The endpoint's path must end in `/v1/channels/<channel>` plus the
|
|
4912
|
+
channel's `path`, after nothing, the agent's slug, or `/engine` on
|
|
4913
|
+
Cursor-managed hosting. A URL for another channel or agent fails without a
|
|
4914
|
+
probe. The `endpoint` answers mean:
|
|
4915
|
+
|
|
4916
|
+
| Answer | Meaning |
|
|
4917
|
+
| --- | --- |
|
|
4918
|
+
| `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. |
|
|
4919
|
+
| `401` with `Unauthorized` | Cursor-managed hosting serves this URL and refuses the unsigned probe before the agent. |
|
|
4920
|
+
| `503` with `teams_not_configured` | The server has no app id or password for this channel. Check `envPrefix` and the secrets. |
|
|
4921
|
+
| `404` | No Teams channel at this path. Check the slug, the channel name, and the route path. |
|
|
4922
|
+
| A redirect | A dev tunnel that needs sign-in. Run `devtunnel access create <id> --anonymous`. |
|
|
4923
|
+
|
|
4924
|
+
`--endpoint` must be the public `https` URL that `dev` or `channels teams forward`
|
|
4925
|
+
prints. `agent-sdk dev` admits unsigned requests from loopback, so a loopback
|
|
4926
|
+
probe proves nothing. Without `--endpoint`, `doctor` probes the Azure Bot's
|
|
4927
|
+
messaging endpoint.
|
|
4928
|
+
|
|
4929
|
+
The channel's `envPrefix` owns the variable names. A new channel file reads
|
|
4930
|
+
`TEAMS_APP_ID`, `TEAMS_APP_PASSWORD`, and `TEAMS_TENANT_ID`. `init --prefix
|
|
4931
|
+
HELM` writes `envPrefix: "HELM"` into the new file and the names
|
|
4932
|
+
`HELM_TEAMS_APP_ID`, `HELM_TEAMS_APP_PASSWORD`, and `HELM_TEAMS_TENANT_ID`. The
|
|
4933
|
+
prefix must start with a letter, and each name must be a valid deployment
|
|
4934
|
+
secret name. When the agent already has a Teams channel, under any file name,
|
|
4935
|
+
`init` keeps it and writes the names it reads; a `--prefix` that disagrees with
|
|
4936
|
+
it stops with an error. `doctor` and `package` read the names from the loaded
|
|
4937
|
+
channel. Multi-agent servers need one Azure Bot per agent.
|
|
4938
|
+
|
|
4939
|
+
A channel that sets `credentials` in code has no env names for the CLI to
|
|
4940
|
+
read. `doctor` then skips the `env`, `token`, and Azure checks and says why,
|
|
4941
|
+
`package` and `init` stop with an error, and `doctor` still probes
|
|
4942
|
+
`--endpoint`.
|
|
4943
|
+
|
|
4346
4944
|
### Test GitHub webhooks {#github}
|
|
4347
4945
|
|
|
4348
4946
|
```text
|
|
@@ -5488,12 +6086,12 @@ Source: /docs/reference/limits.md
|
|
|
5488
6086
|
|
|
5489
6087
|
# Limits
|
|
5490
6088
|
|
|
5491
|
-
Cursor caps deployments for
|
|
6089
|
+
Cursor caps deployments for every team. These are the default values.
|
|
5492
6090
|
|
|
5493
6091
|
| Limit | Default | What counts |
|
|
5494
6092
|
| --- | --- | --- |
|
|
5495
|
-
| `owner.deployments` | 20 | Each slug,
|
|
5496
|
-
| `owner.deploysPerDay` | 100
|
|
6093
|
+
| `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. |
|
|
6094
|
+
| `owner.deploysPerDay` | 100 | Each accepted deploy in a rolling 24-hour window, including a redeploy. |
|
|
5497
6095
|
|
|
5498
6096
|
The error looks like this:
|
|
5499
6097
|
|
|
@@ -5504,7 +6102,7 @@ The error looks like this:
|
|
|
5504
6102
|
"limit": "owner.deployments",
|
|
5505
6103
|
"max": 20,
|
|
5506
6104
|
"current": 20,
|
|
5507
|
-
"docsUrl": "https://cursor.com/docs/
|
|
6105
|
+
"docsUrl": "https://cursor.com/docs/agent-sdk/reference/limits"
|
|
5508
6106
|
}
|
|
5509
6107
|
```
|
|
5510
6108
|
|
|
@@ -5963,6 +6561,18 @@ const events: ChannelEventHandlers = {
|
|
|
5963
6561
|
In a local Slack session, a `nudge.delivered` event with no `deliveryId`
|
|
5964
6562
|
came from a new Slack message, not from a `send()` call.
|
|
5965
6563
|
|
|
6564
|
+
### Steer the agent's own running turn
|
|
6565
|
+
|
|
6566
|
+
A tool or a channel `events` handler can add a message to the turn it runs in
|
|
6567
|
+
with `ctx.steer(message, { deliveryId })`. The message lands through the
|
|
6568
|
+
Cursor SDK's `Run.steer` and is recorded like a steered `send()`, with
|
|
6569
|
+
`message.received` and `nudge.delivered`. It never starts a turn, opens a
|
|
6570
|
+
session, or queues the message. It
|
|
6571
|
+
resolves to `{ status: "steered", turnId, deliveryId }`, to `{ status: "no_turn" }`
|
|
6572
|
+
when the context's turn is no longer running, or to
|
|
6573
|
+
`{ status: "not_delivered", reason }` when the running turn didn't take the
|
|
6574
|
+
message.
|
|
6575
|
+
|
|
5966
6576
|
## Stream events
|
|
5967
6577
|
|
|
5968
6578
|
Each NDJSON line is a `{ type, index, sessionId, turnId?, at, data }`
|
|
@@ -5975,6 +6585,7 @@ ISO-8601 timestamp.
|
|
|
5975
6585
|
| 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) |
|
|
5976
6586
|
| Turn | `turn.queued`, `turn.started`, `turn.completed`, `turn.failed` | Queueing under [`maxRunningTurns`](/docs/reference/agent-config.md#concurrency), then status, result, and token usage |
|
|
5977
6587
|
| Steps | `step.started`, `step.completed` | Model step boundaries and duration |
|
|
6588
|
+
| 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 |
|
|
5978
6589
|
| Reasoning | `reasoning.appended`, `reasoning.completed` | Streamed reasoning blocks |
|
|
5979
6590
|
| Reply | `message.appended`, `message.completed` | Text deltas and finished assistant messages |
|
|
5980
6591
|
| 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 |
|
|
@@ -6623,6 +7234,7 @@ Start with three checks:
|
|
|
6623
7234
|
| The deployment never reaches `running` | Run `agent-sdk deployment get <slug>`, and fix the error it reports. |
|
|
6624
7235
|
| 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. |
|
|
6625
7236
|
| A hosted schedule doesn't fire | Check that the deployment is running and that the schedule is in `bot/schedules/` on the deployed ref. |
|
|
7237
|
+
| The startup log shows `requires CURSOR_API_KEY` | This is expected. See [Startup runs before secrets are available](/docs/deployment.md#startup-runs-before-secrets-are-available). |
|
|
6626
7238
|
| A custom route returns `429` | Wait for the time in `Retry-After`, then send it again. |
|
|
6627
7239
|
|
|
6628
7240
|
## GitHub deliveries fail
|
|
@@ -6642,6 +7254,26 @@ Start with three checks:
|
|
|
6642
7254
|
| `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. |
|
|
6643
7255
|
| The bot ignores ordinary channel posts | Configure `engagement.channelPosts`, create the app with `--channel-posts`, and invite it to each allowed channel. |
|
|
6644
7256
|
|
|
7257
|
+
## Teams does not respond
|
|
7258
|
+
|
|
7259
|
+
| What you see | What to do |
|
|
7260
|
+
| --- | --- |
|
|
7261
|
+
| `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. |
|
|
7262
|
+
| `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. |
|
|
7263
|
+
| `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. |
|
|
7264
|
+
| `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. |
|
|
7265
|
+
| `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`. |
|
|
7266
|
+
| `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`. |
|
|
7267
|
+
| `channels teams doctor` fails the `bot-endpoint` check | Set the endpoint that `dev` printed on the Azure Bot: **Configuration**, **Messaging endpoint**, **Apply**. |
|
|
7268
|
+
| `channels teams doctor` fails the `teams-channel` check | On the Azure Bot, open **Channels**, select **Microsoft Teams**, then select **Apply**. |
|
|
7269
|
+
| `agent-sdk dev` prints `warning: Teams tunnel: cloudflared is not installed` | Install `cloudflared`, put it on `PATH`, and restart `dev`. |
|
|
7270
|
+
| `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`. |
|
|
7271
|
+
| `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`. |
|
|
7272
|
+
| 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. |
|
|
7273
|
+
| 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**. |
|
|
7274
|
+
|
|
7275
|
+
See [Configure Microsoft Teams](/docs/reference/cli.md#teams) for the commands.
|
|
7276
|
+
|
|
6645
7277
|
## MCP authorization fails
|
|
6646
7278
|
|
|
6647
7279
|
| What you see | What to do |
|