@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.
Files changed (530) hide show
  1. package/AGENTS.md +40 -0
  2. package/dist/channels/github/forward.d.ts +5 -0
  3. package/dist/channels/github/forward.d.ts.map +1 -1
  4. package/dist/channels/github/forward.js +6 -3
  5. package/dist/channels/slack/api.d.ts +18 -0
  6. package/dist/channels/slack/api.d.ts.map +1 -1
  7. package/dist/channels/slack/api.js +31 -0
  8. package/dist/channels/slack/approvals.d.ts +19 -2
  9. package/dist/channels/slack/approvals.d.ts.map +1 -1
  10. package/dist/channels/slack/approvals.js +90 -19
  11. package/dist/channels/slack/attachments.d.ts +7 -2
  12. package/dist/channels/slack/attachments.d.ts.map +1 -1
  13. package/dist/channels/slack/attachments.js +318 -156
  14. package/dist/channels/slack/connect-card.d.ts +16 -0
  15. package/dist/channels/slack/connect-card.d.ts.map +1 -0
  16. package/dist/channels/slack/connect-card.js +31 -0
  17. package/dist/channels/slack/credentials.d.ts +10 -2
  18. package/dist/channels/slack/credentials.d.ts.map +1 -1
  19. package/dist/channels/slack/credentials.js +17 -15
  20. package/dist/channels/slack/defaults.d.ts.map +1 -1
  21. package/dist/channels/slack/defaults.js +18 -9
  22. package/dist/channels/slack/dispatch.d.ts +1 -1
  23. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  24. package/dist/channels/slack/dispatch.js +19 -3
  25. package/dist/channels/slack/inbound.d.ts +8 -2
  26. package/dist/channels/slack/inbound.d.ts.map +1 -1
  27. package/dist/channels/slack/inbound.js +25 -4
  28. package/dist/channels/slack/index.d.ts +3 -2
  29. package/dist/channels/slack/index.d.ts.map +1 -1
  30. package/dist/channels/slack/index.js +3 -2
  31. package/dist/channels/slack/init.d.ts.map +1 -1
  32. package/dist/channels/slack/init.js +2 -1
  33. package/dist/channels/slack/manifest.d.ts.map +1 -1
  34. package/dist/channels/slack/manifest.js +2 -15
  35. package/dist/channels/slack/mentions.d.ts +28 -0
  36. package/dist/channels/slack/mentions.d.ts.map +1 -0
  37. package/dist/channels/slack/mentions.js +178 -0
  38. package/dist/channels/slack/setup.js +1 -1
  39. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  40. package/dist/channels/slack/slack-channel.js +46 -3
  41. package/dist/channels/slack/stop.d.ts.map +1 -1
  42. package/dist/channels/slack/stop.js +7 -1
  43. package/dist/channels/slack/thread-context.d.ts +3 -0
  44. package/dist/channels/slack/thread-context.d.ts.map +1 -1
  45. package/dist/channels/slack/thread-context.js +17 -7
  46. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
  47. package/dist/channels/slack/tool-approval-events.js +55 -2
  48. package/dist/channels/slack/types.d.ts +2 -0
  49. package/dist/channels/slack/types.d.ts.map +1 -1
  50. package/dist/channels/teams/activity.d.ts +33 -0
  51. package/dist/channels/teams/activity.d.ts.map +1 -0
  52. package/dist/channels/teams/activity.js +213 -0
  53. package/dist/channels/teams/auth.d.ts +25 -0
  54. package/dist/channels/teams/auth.d.ts.map +1 -0
  55. package/dist/channels/teams/auth.js +55 -0
  56. package/dist/channels/teams/bot-framework-auth.d.ts +33 -0
  57. package/dist/channels/teams/bot-framework-auth.d.ts.map +1 -0
  58. package/dist/channels/teams/bot-framework-auth.js +154 -0
  59. package/dist/channels/teams/cards.d.ts +23 -0
  60. package/dist/channels/teams/cards.d.ts.map +1 -0
  61. package/dist/channels/teams/cards.js +107 -0
  62. package/dist/channels/teams/connector.d.ts +48 -0
  63. package/dist/channels/teams/connector.d.ts.map +1 -0
  64. package/dist/channels/teams/connector.js +159 -0
  65. package/dist/channels/teams/credentials.d.ts +65 -0
  66. package/dist/channels/teams/credentials.d.ts.map +1 -0
  67. package/dist/channels/teams/credentials.js +84 -0
  68. package/dist/channels/teams/delivery.d.ts +14 -0
  69. package/dist/channels/teams/delivery.d.ts.map +1 -0
  70. package/dist/channels/teams/delivery.js +169 -0
  71. package/dist/channels/teams/dispatch.d.ts +45 -0
  72. package/dist/channels/teams/dispatch.d.ts.map +1 -0
  73. package/dist/channels/teams/dispatch.js +402 -0
  74. package/dist/channels/teams/engagement.d.ts +32 -0
  75. package/dist/channels/teams/engagement.d.ts.map +1 -0
  76. package/dist/channels/teams/engagement.js +120 -0
  77. package/dist/channels/teams/index.d.ts +21 -0
  78. package/dist/channels/teams/index.d.ts.map +1 -0
  79. package/dist/channels/teams/index.js +19 -0
  80. package/dist/channels/teams/marks.d.ts +19 -0
  81. package/dist/channels/teams/marks.d.ts.map +1 -0
  82. package/dist/channels/teams/marks.js +96 -0
  83. package/dist/channels/teams/senders.d.ts +27 -0
  84. package/dist/channels/teams/senders.d.ts.map +1 -0
  85. package/dist/channels/teams/senders.js +72 -0
  86. package/dist/channels/teams/teams-channel.d.ts +43 -0
  87. package/dist/channels/teams/teams-channel.d.ts.map +1 -0
  88. package/dist/channels/teams/teams-channel.js +278 -0
  89. package/dist/channels/teams/text.d.ts +7 -0
  90. package/dist/channels/teams/text.d.ts.map +1 -0
  91. package/dist/channels/teams/text.js +63 -0
  92. package/dist/channels/teams/types.d.ts +306 -0
  93. package/dist/channels/teams/types.d.ts.map +1 -0
  94. package/dist/channels/teams/types.js +1 -0
  95. package/dist/channels.d.ts +31 -0
  96. package/dist/channels.d.ts.map +1 -1
  97. package/dist/channels.js +37 -0
  98. package/dist/connections.d.ts +1 -1
  99. package/dist/connections.d.ts.map +1 -1
  100. package/dist/docs/404.html +3 -3
  101. package/dist/docs/assets/{app.CYdjweqP.js → app.Ch-048af.js} +4 -4
  102. package/dist/docs/assets/changelog.md.SoN0MK7o.js +1 -0
  103. package/dist/docs/assets/{changelog.md.BMrJ5WxW.lean.js → changelog.md.SoN0MK7o.lean.js} +1 -1
  104. package/dist/docs/assets/chunks/@localSearchIndexroot.BdYoBKxY.js +1 -0
  105. package/dist/docs/assets/chunks/{VPLocalSearchBox.CRATKS9J.js → VPLocalSearchBox.D7BIa9Su.js} +2 -2
  106. package/dist/docs/assets/chunks/{arc.BxM78ISR.js → arc.BIzu7OVF.js} +1 -1
  107. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.Bi6MuKaU.js → architectureDiagram-Q4EWVU46.DNznI0Sn.js} +1 -1
  108. package/dist/docs/assets/chunks/{baseUniq.L47qqpDG.js → baseUniq.B4y6Y5eG.js} +1 -1
  109. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.kHFF2FK5.js → blockDiagram-DXYQGD6D.BudnBsgw.js} +1 -1
  110. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BTW85ll3.js → c4Diagram-AHTNJAMY._bB00GdB.js} +1 -1
  111. package/dist/docs/assets/chunks/channel.CgxlmuBS.js +1 -0
  112. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.Bbh3_48g.js → chunk-4BX2VUAB.CRftnUwS.js} +1 -1
  113. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.WeAmK3fK.js → chunk-4TB4RGXK.CSx1x2Ob.js} +1 -1
  114. package/dist/docs/assets/chunks/{chunk-55IACEB6.DTdUiVHf.js → chunk-55IACEB6.KkLHAAbH.js} +1 -1
  115. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.n5XzANDz.js → chunk-EDXVE4YY.DDeKCCtX.js} +1 -1
  116. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.D51eewCb.js → chunk-FMBD7UC4.DrLlsD9m.js} +1 -1
  117. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.BrY0U7ZV.js → chunk-OYMX7WX6.DeVYOGcT.js} +1 -1
  118. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.B0OA4aFV.js → chunk-QZHKN3VN.Cz4_bS6p.js} +1 -1
  119. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.Djt3Mjft.js → chunk-YZCP3GAM.CwrYtDVo.js} +1 -1
  120. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DWroREP-.js +1 -0
  121. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DWroREP-.js +1 -0
  122. package/dist/docs/assets/chunks/clone.F824-PNx.js +1 -0
  123. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.DiMcA6Q8.js → cose-bilkent-S5V4N54A.3d8hflz6.js} +1 -1
  124. package/dist/docs/assets/chunks/{dagre-KV5264BT.BGqI4vrS.js → dagre-KV5264BT.BVEgjiPg.js} +1 -1
  125. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.bDqFuMoH.js → diagram-5BDNPKRD.j7dZpUK_.js} +1 -1
  126. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Y0sxaXRU.js → diagram-G4DWMVQ6.4flIgIon.js} +1 -1
  127. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.Bg43b0yi.js → diagram-MMDJMWI5.BlJiFh-S.js} +1 -1
  128. package/dist/docs/assets/chunks/{diagram-TYMM5635.DCfVasEC.js → diagram-TYMM5635.DHAOHEyM.js} +1 -1
  129. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.C72GaD16.js → erDiagram-SMLLAGMA.DkmyG7xK.js} +1 -1
  130. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.DxRQj7pP.js → flowDiagram-DWJPFMVM.L_WiaAU6.js} +1 -1
  131. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.DiLZy5Q4.js → ganttDiagram-T4ZO3ILL.CT6kOI2a.js} +1 -1
  132. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.DL8XkRvh.js → gitGraphDiagram-UUTBAWPF.D8CRlLqh.js} +1 -1
  133. package/dist/docs/assets/chunks/{graph.3Xub80xJ.js → graph.CdOyJvsX.js} +1 -1
  134. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.O3lGaspu.js → infoDiagram-42DDH7IO.DcmXeSos.js} +1 -1
  135. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.w-pCiQzn.js → ishikawaDiagram-UXIWVN3A.BBjY4mxr.js} +1 -1
  136. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.Cg_oBs9j.js → journeyDiagram-VCZTEJTY.BrXteAB6.js} +1 -1
  137. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.BpfMGPwn.js → kanban-definition-6JOO6SKY.OlHsUJVV.js} +1 -1
  138. package/dist/docs/assets/chunks/{layout.CtwXs__p.js → layout.DDwvoQlY.js} +1 -1
  139. package/dist/docs/assets/chunks/{linear.NmCskOrP.js → linear.BRXPDWj3.js} +1 -1
  140. package/dist/docs/assets/chunks/{min.DpQtsLKs.js → min.3YwC0t3o.js} +1 -1
  141. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.B-P-aKVp.js → mindmap-definition-QFDTVHPH.mPHnT2lN.js} +1 -1
  142. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.BfjjqK7j.js → pieDiagram-DEJITSTG.DEK2--em.js} +1 -1
  143. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.BTzHo53F.js → quadrantDiagram-34T5L4WZ.NCdRAOzK.js} +1 -1
  144. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.DIT2FIKr.js → requirementDiagram-MS252O5E.DLAocFWZ.js} +1 -1
  145. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.NK1wCsgt.js → sankeyDiagram-XADWPNL6.afIOqpyT.js} +1 -1
  146. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.D9oElkvo.js → sequenceDiagram-FGHM5R23.DXBjvkkE.js} +1 -1
  147. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.IPksnixH.js → stateDiagram-FHFEXIEX.B_SGgvgs.js} +1 -1
  148. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.OKAy5Bz7.js +1 -0
  149. package/dist/docs/assets/chunks/{theme.CgKu7tr3.js → theme.bNyH5NPA.js} +2 -2
  150. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.CuAtJapY.js → timeline-definition-GMOUNBTQ.CE6S1iSb.js} +1 -1
  151. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.B87nNW9E.js → vennDiagram-DHZGUBPP.Blk7wb8V.js} +1 -1
  152. package/dist/docs/assets/chunks/wardley-RL74JXVD.DQqE3WF8.js +162 -0
  153. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.BELjSq8w.js → wardleyDiagram-NUSXRM2D.MUEQyRnz.js} +1 -1
  154. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.5zN5ZGsz.js → xychartDiagram-5P7HB3ND.DnJA2aXp.js} +1 -1
  155. package/dist/docs/assets/{deployment.md.DJtuDVLh.js → deployment.md.N9S5KC5R.js} +2 -2
  156. package/dist/docs/assets/{deployment.md.DJtuDVLh.lean.js → deployment.md.N9S5KC5R.lean.js} +1 -1
  157. package/dist/docs/assets/guides_cloud-agents.md.BdWqmUGb.js +14 -0
  158. package/dist/docs/assets/{guides_cloud-agents.md.CiXAW6on.lean.js → guides_cloud-agents.md.BdWqmUGb.lean.js} +1 -1
  159. package/dist/docs/assets/guides_teams.md.7Lz2sbqB.js +50 -0
  160. package/dist/docs/assets/guides_teams.md.7Lz2sbqB.lean.js +1 -0
  161. package/dist/docs/assets/{reference_channels.md.CPWOpdsC.js → reference_channels.md.CRvqgU0n.js} +1 -1
  162. package/dist/docs/assets/{reference_cli.md.DHm6DmYk.js → reference_cli.md.NS6U5a-7.js} +14 -4
  163. package/dist/docs/assets/{reference_cli.md.DHm6DmYk.lean.js → reference_cli.md.NS6U5a-7.lean.js} +1 -1
  164. package/dist/docs/assets/{reference_limits.md.CbdtFr4T.js → reference_limits.md.CW9PTdxr.js} +3 -3
  165. package/dist/docs/assets/{reference_limits.md.CbdtFr4T.lean.js → reference_limits.md.CW9PTdxr.lean.js} +1 -1
  166. package/dist/docs/assets/{reference_schedules.md.RhQ9ZLo1.js → reference_schedules.md.Dd8_d0WG.js} +3 -3
  167. package/dist/docs/assets/{reference_sessions.md.NXVQt9mP.js → reference_sessions.md.CoCyQLEz.js} +2 -2
  168. package/dist/docs/assets/{reference_sessions.md.NXVQt9mP.lean.js → reference_sessions.md.CoCyQLEz.lean.js} +1 -1
  169. package/dist/docs/assets/{reference_skills.md.DzCPNPkG.js → reference_skills.md.SFRZDC41.js} +4 -4
  170. package/dist/docs/assets/{reference_skills.md.DzCPNPkG.lean.js → reference_skills.md.SFRZDC41.lean.js} +1 -1
  171. package/dist/docs/assets/{style.DK0YX1WL.css → style.B7zPxANR.css} +1 -1
  172. package/dist/docs/assets/troubleshooting.md.CsQTleto.js +3 -0
  173. package/dist/docs/assets/{troubleshooting.md.DfKKvW1R.lean.js → troubleshooting.md.CsQTleto.lean.js} +1 -1
  174. package/dist/docs/building-with-agents.html +37 -37
  175. package/dist/docs/changelog.html +37 -37
  176. package/dist/docs/changelog.md +51 -0
  177. package/dist/docs/deployment.html +39 -39
  178. package/dist/docs/deployment.md +10 -0
  179. package/dist/docs/evals.html +37 -37
  180. package/dist/docs/guides/agent-to-agent.html +37 -37
  181. package/dist/docs/guides/bitbucket.html +37 -37
  182. package/dist/docs/guides/cloud-agents.html +43 -38
  183. package/dist/docs/guides/cloud-agents.md +47 -0
  184. package/dist/docs/guides/convert-automation.html +37 -37
  185. package/dist/docs/guides/github.html +37 -37
  186. package/dist/docs/guides/gitlab.html +37 -37
  187. package/dist/docs/guides/improve.html +37 -37
  188. package/dist/docs/guides/jev.html +37 -37
  189. package/dist/docs/guides/mcp-oauth.html +37 -37
  190. package/dist/docs/guides/migrate.html +37 -37
  191. package/dist/docs/guides/opentelemetry.html +37 -37
  192. package/dist/docs/guides/pagerduty.html +37 -37
  193. package/dist/docs/guides/slack.html +37 -37
  194. package/dist/docs/guides/teams.html +109 -0
  195. package/dist/docs/guides/teams.md +384 -0
  196. package/dist/docs/guides/webhooks.html +37 -37
  197. package/dist/docs/hashmap.json +1 -1
  198. package/dist/docs/hillclimbing.html +37 -37
  199. package/dist/docs/index.html +37 -37
  200. package/dist/docs/llms-full.txt +652 -4
  201. package/dist/docs/llms.txt +1 -0
  202. package/dist/docs/quickstart.html +37 -37
  203. package/dist/docs/reference/access.html +36 -36
  204. package/dist/docs/reference/agent-config.html +37 -37
  205. package/dist/docs/reference/artifacts.html +37 -37
  206. package/dist/docs/reference/channels.html +38 -38
  207. package/dist/docs/reference/channels.md +1 -0
  208. package/dist/docs/reference/cli.html +50 -40
  209. package/dist/docs/reference/cli.md +116 -0
  210. package/dist/docs/reference/connections.html +37 -37
  211. package/dist/docs/reference/evals.html +37 -37
  212. package/dist/docs/reference/extensions.html +37 -37
  213. package/dist/docs/reference/hooks.html +37 -37
  214. package/dist/docs/reference/http-api.html +37 -37
  215. package/dist/docs/reference/instructions.html +37 -37
  216. package/dist/docs/reference/limits.html +39 -39
  217. package/dist/docs/reference/limits.md +4 -4
  218. package/dist/docs/reference/memory.html +37 -37
  219. package/dist/docs/reference/playground.html +36 -36
  220. package/dist/docs/reference/project-layout.html +37 -37
  221. package/dist/docs/reference/schedules.html +40 -40
  222. package/dist/docs/reference/sessions.html +38 -38
  223. package/dist/docs/reference/sessions.md +13 -0
  224. package/dist/docs/reference/skills.html +40 -40
  225. package/dist/docs/reference/subagents.html +37 -37
  226. package/dist/docs/reference/tools.html +37 -37
  227. package/dist/docs/templates/agentic-owners.html +37 -37
  228. package/dist/docs/templates/reviews.html +37 -37
  229. package/dist/docs/troubleshooting.html +38 -38
  230. package/dist/docs/troubleshooting.md +21 -0
  231. package/dist/evals/run-facts.d.ts.map +1 -1
  232. package/dist/evals/run-facts.js +4 -0
  233. package/dist/extensions/cursor-cloud-agents/channels/cursor-cloud-agents.d.ts +12 -0
  234. package/dist/extensions/cursor-cloud-agents/channels/cursor-cloud-agents.d.ts.map +1 -0
  235. package/dist/extensions/cursor-cloud-agents/channels/cursor-cloud-agents.js +42 -0
  236. package/dist/extensions/cursor-cloud-agents/extension.d.ts +10 -7
  237. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  238. package/dist/extensions/cursor-cloud-agents/extension.js +3 -2
  239. package/dist/extensions/cursor-cloud-agents/lib/agent-id.d.ts +5 -0
  240. package/dist/extensions/cursor-cloud-agents/lib/agent-id.d.ts.map +1 -0
  241. package/dist/extensions/cursor-cloud-agents/lib/agent-id.js +10 -0
  242. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +57 -3
  243. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
  244. package/dist/extensions/cursor-cloud-agents/lib/backend.js +150 -35
  245. package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts +32 -4
  246. package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts.map +1 -1
  247. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +93 -7
  248. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +24 -7
  249. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -1
  250. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +158 -25
  251. package/dist/extensions/cursor-cloud-agents/lib/stop-signal.d.ts +18 -0
  252. package/dist/extensions/cursor-cloud-agents/lib/stop-signal.d.ts.map +1 -0
  253. package/dist/extensions/cursor-cloud-agents/lib/stop-signal.js +27 -0
  254. package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -1
  255. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -3
  256. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts +26 -12
  257. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -1
  258. package/dist/extensions/cursor-cloud-agents/lib/watch.js +115 -46
  259. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts +16 -5
  260. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts.map +1 -1
  261. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +76 -20
  262. package/dist/extensions/cursor-cloud-agents/skills/handoff.md +2 -2
  263. package/dist/extensions/cursor-cloud-agents/tools/get.js +2 -2
  264. package/dist/extensions/cursor-cloud-agents/tools/launch.js +1 -1
  265. package/dist/extensions.d.ts.map +1 -1
  266. package/dist/extensions.js +18 -3
  267. package/dist/files-backends/agent-store-presigned-url.js +5 -1
  268. package/dist/index.d.ts +1 -0
  269. package/dist/index.d.ts.map +1 -1
  270. package/dist/index.js +1 -0
  271. package/dist/internal/approval-gate.d.ts +6 -1
  272. package/dist/internal/approval-gate.d.ts.map +1 -1
  273. package/dist/internal/approval-gate.js +13 -2
  274. package/dist/internal/authored-loaders.js +1 -1
  275. package/dist/internal/channel-architecture.d.ts.map +1 -1
  276. package/dist/internal/channel-architecture.js +3 -1
  277. package/dist/internal/cli/commands/channels.d.ts +9 -3
  278. package/dist/internal/cli/commands/channels.d.ts.map +1 -1
  279. package/dist/internal/cli/commands/channels.js +193 -4
  280. package/dist/internal/cli/commands/index.d.ts.map +1 -1
  281. package/dist/internal/cli/commands/index.js +6 -1
  282. package/dist/internal/cli/commands/serve.d.ts.map +1 -1
  283. package/dist/internal/cli/commands/serve.js +25 -5
  284. package/dist/internal/cli/dispatch.d.ts.map +1 -1
  285. package/dist/internal/cli/dispatch.js +22 -8
  286. package/dist/internal/cli/flags.d.ts +14 -0
  287. package/dist/internal/cli/flags.d.ts.map +1 -1
  288. package/dist/internal/cli/flags.js +14 -0
  289. package/dist/internal/cli/help.d.ts.map +1 -1
  290. package/dist/internal/cli/help.js +3 -1
  291. package/dist/internal/cli-cursor.js +2 -2
  292. package/dist/internal/cli-deploy.d.ts +1 -0
  293. package/dist/internal/cli-deploy.d.ts.map +1 -1
  294. package/dist/internal/cli-deploy.js +31 -8
  295. package/dist/internal/cli-mcp.d.ts.map +1 -1
  296. package/dist/internal/cli-mcp.js +5 -3
  297. package/dist/internal/cli-teams-doctor.d.ts +39 -0
  298. package/dist/internal/cli-teams-doctor.d.ts.map +1 -0
  299. package/dist/internal/cli-teams-doctor.js +508 -0
  300. package/dist/internal/cli-teams-forward.d.ts +84 -0
  301. package/dist/internal/cli-teams-forward.d.ts.map +1 -0
  302. package/dist/internal/cli-teams-forward.js +386 -0
  303. package/dist/internal/cli-teams-package.d.ts +26 -0
  304. package/dist/internal/cli-teams-package.d.ts.map +1 -0
  305. package/dist/internal/cli-teams-package.js +123 -0
  306. package/dist/internal/cli-teams.d.ts +15 -0
  307. package/dist/internal/cli-teams.d.ts.map +1 -0
  308. package/dist/internal/cli-teams.js +253 -0
  309. package/dist/internal/connect-click.d.ts +12 -0
  310. package/dist/internal/connect-click.d.ts.map +1 -0
  311. package/dist/internal/connect-click.js +22 -0
  312. package/dist/internal/continuation-channel.d.ts +5 -1
  313. package/dist/internal/continuation-channel.d.ts.map +1 -1
  314. package/dist/internal/continuation-channel.js +34 -0
  315. package/dist/internal/continuation-identity.d.ts +7 -4
  316. package/dist/internal/continuation-identity.d.ts.map +1 -1
  317. package/dist/internal/continuation-identity.js +66 -1
  318. package/dist/internal/convert-automation/convert-workflow.js +2 -2
  319. package/dist/internal/credential-env-names.d.ts +36 -0
  320. package/dist/internal/credential-env-names.d.ts.map +1 -0
  321. package/dist/internal/credential-env-names.js +68 -0
  322. package/dist/internal/cursor/account-mcp.d.ts +67 -9
  323. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  324. package/dist/internal/cursor/account-mcp.js +206 -25
  325. package/dist/internal/cursor/backend-client.d.ts +10 -1
  326. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  327. package/dist/internal/cursor/backend-client.js +19 -7
  328. package/dist/internal/cursor/cloud-agent-identity.d.ts +81 -0
  329. package/dist/internal/cursor/cloud-agent-identity.d.ts.map +1 -0
  330. package/dist/internal/cursor/cloud-agent-identity.js +224 -0
  331. package/dist/internal/cursor/credentials.d.ts.map +1 -1
  332. package/dist/internal/cursor/credentials.js +3 -1
  333. package/dist/internal/cursor-account-mcp-auth.d.ts +1 -0
  334. package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -1
  335. package/dist/internal/cursor-account-mcp-auth.js +2 -1
  336. package/dist/internal/deploy-client.d.ts.map +1 -1
  337. package/dist/internal/deploy-client.js +34 -2
  338. package/dist/internal/deploy-manifest.d.ts +51 -3
  339. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  340. package/dist/internal/deploy-manifest.js +96 -7
  341. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  342. package/dist/internal/discovery/agent-config.js +6 -1
  343. package/dist/internal/discovery/connections.d.ts.map +1 -1
  344. package/dist/internal/discovery/connections.js +53 -0
  345. package/dist/internal/discovery/extensions.d.ts.map +1 -1
  346. package/dist/internal/discovery/extensions.js +2 -0
  347. package/dist/internal/discovery/info.d.ts.map +1 -1
  348. package/dist/internal/discovery/info.js +4 -0
  349. package/dist/internal/env-file.d.ts +1 -0
  350. package/dist/internal/env-file.d.ts.map +1 -1
  351. package/dist/internal/env-file.js +18 -17
  352. package/dist/internal/env-prefix.d.ts +11 -0
  353. package/dist/internal/env-prefix.d.ts.map +1 -0
  354. package/dist/internal/env-prefix.js +23 -0
  355. package/dist/internal/event-id-dedupe.d.ts +12 -0
  356. package/dist/internal/event-id-dedupe.d.ts.map +1 -0
  357. package/dist/{channels/slack → internal}/event-id-dedupe.js +7 -4
  358. package/dist/internal/event-mapper.d.ts +7 -2
  359. package/dist/internal/event-mapper.d.ts.map +1 -1
  360. package/dist/internal/event-mapper.js +7 -0
  361. package/dist/internal/expected-delivery-failure.d.ts.map +1 -1
  362. package/dist/internal/expected-delivery-failure.js +3 -0
  363. package/dist/internal/extension-namespace.d.ts +9 -0
  364. package/dist/internal/extension-namespace.d.ts.map +1 -0
  365. package/dist/internal/extension-namespace.js +14 -0
  366. package/dist/internal/guid.d.ts +2 -0
  367. package/dist/internal/guid.d.ts.map +1 -0
  368. package/dist/internal/guid.js +4 -0
  369. package/dist/internal/host-kv-cas.d.ts +13 -0
  370. package/dist/internal/host-kv-cas.d.ts.map +1 -0
  371. package/dist/internal/host-kv-cas.js +8 -0
  372. package/dist/internal/host-kv.d.ts +4 -1
  373. package/dist/internal/host-kv.d.ts.map +1 -1
  374. package/dist/internal/host-kv.js +15 -2
  375. package/dist/internal/hosted-catch-protocol.d.ts +5 -0
  376. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  377. package/dist/internal/hosted-catch-protocol.js +5 -0
  378. package/dist/internal/hosted-catch.d.ts +2 -0
  379. package/dist/internal/hosted-catch.d.ts.map +1 -1
  380. package/dist/internal/hosted-catch.js +6 -1
  381. package/dist/internal/hosted-delivery-protocol.d.ts +6 -0
  382. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  383. package/dist/internal/hosted-delivery-protocol.js +71 -1
  384. package/dist/internal/hosted-delivery.d.ts +5 -2
  385. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  386. package/dist/internal/hosted-delivery.js +36 -12
  387. package/dist/internal/hosted-execution-latency.d.ts +3 -0
  388. package/dist/internal/hosted-execution-latency.d.ts.map +1 -1
  389. package/dist/internal/hosted-execution-latency.js +11 -0
  390. package/dist/internal/hosted-session-fixture.js +1 -1
  391. package/dist/internal/hosting.d.ts +5 -0
  392. package/dist/internal/hosting.d.ts.map +1 -1
  393. package/dist/internal/hosting.js +7 -1
  394. package/dist/internal/install-cursor-skills.d.ts +6 -7
  395. package/dist/internal/install-cursor-skills.d.ts.map +1 -1
  396. package/dist/internal/install-cursor-skills.js +15 -9
  397. package/dist/internal/interview/agent-questions.d.ts +1 -1
  398. package/dist/internal/interview/agent-questions.d.ts.map +1 -1
  399. package/dist/internal/interview/agent-questions.js +4 -3
  400. package/dist/internal/local-control-plane.d.ts.map +1 -1
  401. package/dist/internal/local-control-plane.js +24 -0
  402. package/dist/internal/mcp-allowlist-in-use.d.ts +23 -0
  403. package/dist/internal/mcp-allowlist-in-use.d.ts.map +1 -0
  404. package/dist/internal/mcp-allowlist-in-use.js +93 -0
  405. package/dist/internal/mcp-endpoint.d.ts.map +1 -1
  406. package/dist/internal/mcp-endpoint.js +8 -10
  407. package/dist/internal/mcp-host.d.ts +19 -1
  408. package/dist/internal/mcp-host.d.ts.map +1 -1
  409. package/dist/internal/mcp-host.js +67 -3
  410. package/dist/internal/mcp-oauth.d.ts.map +1 -1
  411. package/dist/internal/mcp-oauth.js +5 -7
  412. package/dist/internal/oidcAudiences.d.ts +22 -0
  413. package/dist/internal/oidcAudiences.d.ts.map +1 -0
  414. package/dist/internal/oidcAudiences.js +35 -0
  415. package/dist/internal/otel/collector.d.ts.map +1 -1
  416. package/dist/internal/otel/collector.js +2 -0
  417. package/dist/internal/platform-timers.d.ts +2 -0
  418. package/dist/internal/platform-timers.d.ts.map +1 -1
  419. package/dist/internal/platform-timers.js +14 -0
  420. package/dist/internal/private-file.d.ts +32 -1
  421. package/dist/internal/private-file.d.ts.map +1 -1
  422. package/dist/internal/private-file.js +209 -7
  423. package/dist/internal/redact-values.d.ts +3 -0
  424. package/dist/internal/redact-values.d.ts.map +1 -0
  425. package/dist/internal/redact-values.js +19 -0
  426. package/dist/internal/reminder-control-plane-protocol.d.ts +7 -1
  427. package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
  428. package/dist/internal/reminder-followup-error.d.ts +23 -0
  429. package/dist/internal/reminder-followup-error.d.ts.map +1 -0
  430. package/dist/internal/reminder-followup-error.js +12 -0
  431. package/dist/internal/reminder-runner.d.ts +15 -1
  432. package/dist/internal/reminder-runner.d.ts.map +1 -1
  433. package/dist/internal/reminder-runner.js +95 -21
  434. package/dist/internal/resolved-connections.d.ts.map +1 -1
  435. package/dist/internal/resolved-connections.js +23 -3
  436. package/dist/internal/run-client.js +2 -1
  437. package/dist/internal/run-program.d.ts +31 -0
  438. package/dist/internal/run-program.d.ts.map +1 -0
  439. package/dist/internal/run-program.js +150 -0
  440. package/dist/internal/sdk-runner.d.ts +29 -3
  441. package/dist/internal/sdk-runner.d.ts.map +1 -1
  442. package/dist/internal/sdk-runner.js +304 -38
  443. package/dist/internal/server.d.ts.map +1 -1
  444. package/dist/internal/server.js +53 -8
  445. package/dist/internal/session-credential.d.ts +14 -0
  446. package/dist/internal/session-credential.d.ts.map +1 -0
  447. package/dist/internal/session-credential.js +25 -0
  448. package/dist/internal/session-engine.d.ts +137 -5
  449. package/dist/internal/session-engine.d.ts.map +1 -1
  450. package/dist/internal/session-engine.js +606 -92
  451. package/dist/internal/storage-coordinator.d.ts +3 -1
  452. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  453. package/dist/internal/storage-coordinator.js +13 -0
  454. package/dist/internal/storage-roles.d.ts +9 -1
  455. package/dist/internal/storage-roles.d.ts.map +1 -1
  456. package/dist/internal/tcp-address.d.ts +3 -1
  457. package/dist/internal/tcp-address.d.ts.map +1 -1
  458. package/dist/internal/tcp-address.js +6 -0
  459. package/dist/internal/teams-channel-profile.d.ts +41 -0
  460. package/dist/internal/teams-channel-profile.d.ts.map +1 -0
  461. package/dist/internal/teams-channel-profile.js +91 -0
  462. package/dist/internal/teams-devtunnel.d.ts +55 -0
  463. package/dist/internal/teams-devtunnel.d.ts.map +1 -0
  464. package/dist/internal/teams-devtunnel.js +205 -0
  465. package/dist/internal/teams-tunnel-proxy.d.ts +17 -0
  466. package/dist/internal/teams-tunnel-proxy.d.ts.map +1 -0
  467. package/dist/internal/teams-tunnel-proxy.js +100 -0
  468. package/dist/internal/testing/conversation-identity-vectors.d.ts +7 -1
  469. package/dist/internal/testing/conversation-identity-vectors.d.ts.map +1 -1
  470. package/dist/internal/testing/conversation-identity-vectors.js +67 -0
  471. package/dist/internal/testing/hosted-http.d.ts +15 -0
  472. package/dist/internal/testing/hosted-http.d.ts.map +1 -0
  473. package/dist/internal/testing/hosted-http.js +86 -0
  474. package/dist/internal/testing/teams-activity-fixtures.d.ts +28 -0
  475. package/dist/internal/testing/teams-activity-fixtures.d.ts.map +1 -0
  476. package/dist/internal/testing/teams-activity-fixtures.js +236 -0
  477. package/dist/internal/testing/teams-doctor-fixtures.d.ts +76 -0
  478. package/dist/internal/testing/teams-doctor-fixtures.d.ts.map +1 -0
  479. package/dist/internal/testing/teams-doctor-fixtures.js +216 -0
  480. package/dist/internal/tunnel-process.d.ts +29 -0
  481. package/dist/internal/tunnel-process.d.ts.map +1 -0
  482. package/dist/internal/tunnel-process.js +105 -0
  483. package/dist/internal/turn-context.d.ts +28 -0
  484. package/dist/internal/turn-context.d.ts.map +1 -0
  485. package/dist/internal/turn-context.js +1 -0
  486. package/dist/oidc-token.d.ts +127 -0
  487. package/dist/oidc-token.d.ts.map +1 -0
  488. package/dist/oidc-token.js +221 -0
  489. package/dist/playground/assets/index-BaBSZXki.css +1 -0
  490. package/dist/playground/assets/index-BkAF8YlO.js +62 -0
  491. package/dist/playground/index.html +2 -2
  492. package/dist/teams-app-package.d.ts +78 -0
  493. package/dist/teams-app-package.d.ts.map +1 -0
  494. package/dist/teams-app-package.js +204 -0
  495. package/dist/tools.d.ts +1 -1
  496. package/dist/tools.d.ts.map +1 -1
  497. package/dist/types.d.ts +278 -2
  498. package/dist/types.d.ts.map +1 -1
  499. package/docs/changelog.md +51 -0
  500. package/docs/deployment.md +10 -0
  501. package/docs/guides/cloud-agents.md +47 -0
  502. package/docs/guides/teams.md +389 -0
  503. package/docs/reference/channels.md +1 -0
  504. package/docs/reference/cli.md +116 -0
  505. package/docs/reference/limits.md +4 -4
  506. package/docs/reference/sessions.md +13 -0
  507. package/docs/troubleshooting.md +21 -0
  508. package/package.json +21 -46
  509. package/skills/create-agent/SKILL.md +17 -4
  510. package/skills/debug/SKILL.md +1 -0
  511. package/skills/deploy/SKILL.md +1 -1
  512. package/skills/framework-map/SKILL.md +1 -0
  513. package/skills/setup-teams/SKILL.md +141 -0
  514. package/templates/agentic-owners/bot/lib/owners/parse.ts +1 -0
  515. package/dist/channels/slack/event-id-dedupe.d.ts +0 -10
  516. package/dist/channels/slack/event-id-dedupe.d.ts.map +0 -1
  517. package/dist/docs/assets/changelog.md.BMrJ5WxW.js +0 -1
  518. package/dist/docs/assets/chunks/@localSearchIndexroot.dUaE1f8e.js +0 -1
  519. package/dist/docs/assets/chunks/channel.ljJtQtBi.js +0 -1
  520. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BZ3Uc-XU.js +0 -1
  521. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BZ3Uc-XU.js +0 -1
  522. package/dist/docs/assets/chunks/clone.BDtbEo69.js +0 -1
  523. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CbhzVsQE.js +0 -1
  524. package/dist/docs/assets/chunks/wardley-RL74JXVD.BFIVMaoi.js +0 -162
  525. package/dist/docs/assets/guides_cloud-agents.md.CiXAW6on.js +0 -9
  526. package/dist/docs/assets/troubleshooting.md.DfKKvW1R.js +0 -3
  527. package/dist/playground/assets/index-D0-FHg1x.css +0 -1
  528. package/dist/playground/assets/index-D5SLKUy6.js +0 -62
  529. /package/dist/docs/assets/{reference_channels.md.CPWOpdsC.lean.js → reference_channels.md.CRvqgU0n.lean.js} +0 -0
  530. /package/dist/docs/assets/{reference_schedules.md.RhQ9ZLo1.lean.js → reference_schedules.md.Dd8_d0WG.lean.js} +0 -0
@@ -54,6 +54,53 @@ 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
+
92
+ ## 0.6.0 (2026-11-03)
93
+
94
+ ### Minimum versions
95
+
96
+ - `@grok/agent-sdk` requires `@cursor/sdk` 1.3.0.
97
+
98
+ ### Behavior changes
99
+
100
+ - On Cursor-managed hosting, when the team turns on its Cloud Agent Allowlist, a turn checks the `url:` and `command:` connections it opens against that list. It also checks their network hosts against the team's network allowlist for Cloud Agents. Before, it used the team's MCP Allowlist. Agents that you run with `agent-sdk serve` keep the MCP Allowlist.
101
+ - On Cursor-managed hosting, when the team turns on its Cloud Agent Allowlist, the Cursor backend checks each `cursorAccount` connection against that list. The turn's local MCP checks no longer refuse these connections.
102
+ - An agent with `cursorAccount` connections starts its shared workspace after those connections resolve. Other agents still start it when the server starts.
103
+
57
104
  ## 0.5.0 (2026-10-28)
58
105
 
59
106
  ### Breaking changes
@@ -65,6 +112,10 @@ Source: /docs/changelog.md
65
112
  - `nearestNeighborMissHint` is removed. Read suggests nearby names when a file is missing.
66
113
  - `RunnerTurnRequest` carries `fs`, `reportedWorkspacePath`, and `settingSources` instead of `root` and `subagentInherit`.
67
114
 
115
+ ### Minimum versions
116
+
117
+ - `@grok/agent-sdk` requires `@cursor/sdk` 1.2.0.
118
+
68
119
  ### Behavior changes
69
120
 
70
121
  - With `fs`, `AGENTS.md` and `.cursor/rules/` in the workspace load as project rules, as they do on the host. Don't make a checkout you don't trust the workspace.
@@ -281,6 +332,16 @@ the deployment watches only its GitHub source repository. Run
281
332
  Sessions, `ctx.host.kv`, and `ctx.host.files` survive restarts and
282
333
  redeploys. Anything else the agent writes to disk can disappear.
283
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
+
284
345
  ## Self-host securely
285
346
 
286
347
  Run Agent SDK under Node 22.13 or newer, never Bun. One process can serve
@@ -868,6 +929,53 @@ caller uses the same bearer token, the extension treats them all as one person.
868
929
  Use [authored auth](/docs/reference/channels.md#auth-policies) to keep callers
869
930
  apart.
870
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
+
871
979
  ## Configure it
872
980
 
873
981
  | Option | What it controls |
@@ -2606,6 +2714,395 @@ follow the `agent-sdk-setup-slack` skill for installation and tokens.
2606
2714
 
2607
2715
  ---
2608
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
+
2609
3106
  Source: /docs/guides/webhooks.md
2610
3107
 
2611
3108
  # Webhook agents
@@ -3748,6 +4245,7 @@ Import each one from `@grok/agent-sdk/channels/<name>`.
3748
4245
  | Function | Details |
3749
4246
  | --- | --- |
3750
4247
  | `slackChannel()` | [Slack](/docs/guides/slack.md) |
4248
+ | `teamsChannel()` | [Microsoft Teams](/docs/guides/teams.md) |
3751
4249
  | `githubChannel()` | [GitHub](/docs/guides/github.md) |
3752
4250
  | `gitlabChannel()` | [GitLab](/docs/guides/gitlab.md) |
3753
4251
  | `bitbucketChannel()` | [Bitbucket](/docs/guides/bitbucket.md) |
@@ -3858,6 +4356,7 @@ command remains available.
3858
4356
  | [`mcp serve`, `mcp install`](#mcp) | Connect an MCP client to an agent |
3859
4357
  | [`mcp oauth`](#mcp-oauth) | Authorize an MCP connection |
3860
4358
  | [`slack`](#slack) | Provision and check Slack channel apps |
4359
+ | [`teams`](#teams) | Connect, check, and package a Microsoft Teams bot |
3861
4360
  | [`github`](#github) | Forward, replay, and inspect GitHub webhooks |
3862
4361
  | [`gitlab`, `bitbucket`, `pagerduty`](#replay-other-webhooks) | Replay and inspect GitLab, Bitbucket, or PagerDuty webhooks |
3863
4362
 
@@ -3923,6 +4422,12 @@ agent-sdk dev ./agent-sdk-pr-reviewer --port 3000
3923
4422
  It accepts every `serve` option. Don't combine the path with a different
3924
4423
  `--dir`.
3925
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
+
3926
4431
  ### Serve the docs {#docs}
3927
4432
 
3928
4433
  ```text
@@ -4327,6 +4832,115 @@ token prefix defaults to the project directory name in upper snake case.
4327
4832
  `--channel-posts` adds the message events that `engagement.channelPosts`
4328
4833
  needs. See [Slack](/docs/guides/slack.md) for manual setup.
4329
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
+
4330
4944
  ### Test GitHub webhooks {#github}
4331
4945
 
4332
4946
  ```text
@@ -5472,12 +6086,12 @@ Source: /docs/reference/limits.md
5472
6086
 
5473
6087
  # Limits
5474
6088
 
5475
- Cursor caps deployments for some teams. If your team has caps, these are the default values.
6089
+ Cursor caps deployments for every team. These are the default values.
5476
6090
 
5477
6091
  | Limit | Default | What counts |
5478
6092
  | --- | --- | --- |
5479
- | `owner.deployments` | 20 | Each slug, running or stopped |
5480
- | `owner.deploysPerDay` | 100 per 24 hours | Each accepted deploy, including redeploys |
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. |
5481
6095
 
5482
6096
  The error looks like this:
5483
6097
 
@@ -5488,7 +6102,7 @@ The error looks like this:
5488
6102
  "limit": "owner.deployments",
5489
6103
  "max": 20,
5490
6104
  "current": 20,
5491
- "docsUrl": "https://cursor.com/docs/bdk/reference/limits"
6105
+ "docsUrl": "https://cursor.com/docs/agent-sdk/reference/limits"
5492
6106
  }
5493
6107
  ```
5494
6108
 
@@ -5947,6 +6561,18 @@ const events: ChannelEventHandlers = {
5947
6561
  In a local Slack session, a `nudge.delivered` event with no `deliveryId`
5948
6562
  came from a new Slack message, not from a `send()` call.
5949
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
+
5950
6576
  ## Stream events
5951
6577
 
5952
6578
  Each NDJSON line is a `{ type, index, sessionId, turnId?, at, data }`
@@ -5959,6 +6585,7 @@ ISO-8601 timestamp.
5959
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) |
5960
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 |
5961
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 |
5962
6589
  | Reasoning | `reasoning.appended`, `reasoning.completed` | Streamed reasoning blocks |
5963
6590
  | Reply | `message.appended`, `message.completed` | Text deltas and finished assistant messages |
5964
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 |
@@ -6607,6 +7234,7 @@ Start with three checks:
6607
7234
  | The deployment never reaches `running` | Run `agent-sdk deployment get <slug>`, and fix the error it reports. |
6608
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. |
6609
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). |
6610
7238
  | A custom route returns `429` | Wait for the time in `Retry-After`, then send it again. |
6611
7239
 
6612
7240
  ## GitHub deliveries fail
@@ -6626,6 +7254,26 @@ Start with three checks:
6626
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. |
6627
7255
  | The bot ignores ordinary channel posts | Configure `engagement.channelPosts`, create the app with `--channel-posts`, and invite it to each allowed channel. |
6628
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
+
6629
7277
  ## MCP authorization fails
6630
7278
 
6631
7279
  | What you see | What to do |