@grok/agent-sdk 0.6.0 → 0.7.1

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 (550) hide show
  1. package/AGENTS.md +40 -0
  2. package/dist/channels/github/cursor-account.d.ts +1 -0
  3. package/dist/channels/github/cursor-account.d.ts.map +1 -1
  4. package/dist/channels/github/cursor-account.js +8 -2
  5. package/dist/channels/github/forward.d.ts +5 -0
  6. package/dist/channels/github/forward.d.ts.map +1 -1
  7. package/dist/channels/github/forward.js +6 -3
  8. package/dist/channels/origin/cursor-account.d.ts +6 -0
  9. package/dist/channels/origin/cursor-account.d.ts.map +1 -1
  10. package/dist/channels/origin/cursor-account.js +17 -0
  11. package/dist/channels/slack/api.d.ts +18 -0
  12. package/dist/channels/slack/api.d.ts.map +1 -1
  13. package/dist/channels/slack/api.js +31 -0
  14. package/dist/channels/slack/approvals.d.ts +19 -2
  15. package/dist/channels/slack/approvals.d.ts.map +1 -1
  16. package/dist/channels/slack/approvals.js +90 -19
  17. package/dist/channels/slack/attachments.d.ts +7 -2
  18. package/dist/channels/slack/attachments.d.ts.map +1 -1
  19. package/dist/channels/slack/attachments.js +318 -156
  20. package/dist/channels/slack/connect-card.d.ts +16 -0
  21. package/dist/channels/slack/connect-card.d.ts.map +1 -0
  22. package/dist/channels/slack/connect-card.js +31 -0
  23. package/dist/channels/slack/credentials.d.ts +10 -2
  24. package/dist/channels/slack/credentials.d.ts.map +1 -1
  25. package/dist/channels/slack/credentials.js +17 -15
  26. package/dist/channels/slack/defaults.d.ts.map +1 -1
  27. package/dist/channels/slack/defaults.js +18 -9
  28. package/dist/channels/slack/dispatch.d.ts +1 -1
  29. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  30. package/dist/channels/slack/dispatch.js +19 -3
  31. package/dist/channels/slack/inbound.d.ts +8 -2
  32. package/dist/channels/slack/inbound.d.ts.map +1 -1
  33. package/dist/channels/slack/inbound.js +25 -4
  34. package/dist/channels/slack/index.d.ts +3 -2
  35. package/dist/channels/slack/index.d.ts.map +1 -1
  36. package/dist/channels/slack/index.js +3 -2
  37. package/dist/channels/slack/init.d.ts.map +1 -1
  38. package/dist/channels/slack/init.js +2 -1
  39. package/dist/channels/slack/mentions.d.ts +28 -0
  40. package/dist/channels/slack/mentions.d.ts.map +1 -0
  41. package/dist/channels/slack/mentions.js +178 -0
  42. package/dist/channels/slack/setup.js +1 -1
  43. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  44. package/dist/channels/slack/slack-channel.js +46 -3
  45. package/dist/channels/slack/stop.d.ts.map +1 -1
  46. package/dist/channels/slack/stop.js +7 -1
  47. package/dist/channels/slack/thread-context.d.ts +3 -0
  48. package/dist/channels/slack/thread-context.d.ts.map +1 -1
  49. package/dist/channels/slack/thread-context.js +17 -7
  50. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
  51. package/dist/channels/slack/tool-approval-events.js +55 -2
  52. package/dist/channels/slack/types.d.ts +2 -0
  53. package/dist/channels/slack/types.d.ts.map +1 -1
  54. package/dist/channels/teams/activity.d.ts +33 -0
  55. package/dist/channels/teams/activity.d.ts.map +1 -0
  56. package/dist/channels/teams/activity.js +213 -0
  57. package/dist/channels/teams/auth.d.ts +25 -0
  58. package/dist/channels/teams/auth.d.ts.map +1 -0
  59. package/dist/channels/teams/auth.js +55 -0
  60. package/dist/channels/teams/bot-framework-auth.d.ts +33 -0
  61. package/dist/channels/teams/bot-framework-auth.d.ts.map +1 -0
  62. package/dist/channels/teams/bot-framework-auth.js +154 -0
  63. package/dist/channels/teams/cards.d.ts +23 -0
  64. package/dist/channels/teams/cards.d.ts.map +1 -0
  65. package/dist/channels/teams/cards.js +107 -0
  66. package/dist/channels/teams/connector.d.ts +48 -0
  67. package/dist/channels/teams/connector.d.ts.map +1 -0
  68. package/dist/channels/teams/connector.js +159 -0
  69. package/dist/channels/teams/credentials.d.ts +65 -0
  70. package/dist/channels/teams/credentials.d.ts.map +1 -0
  71. package/dist/channels/teams/credentials.js +84 -0
  72. package/dist/channels/teams/delivery.d.ts +14 -0
  73. package/dist/channels/teams/delivery.d.ts.map +1 -0
  74. package/dist/channels/teams/delivery.js +169 -0
  75. package/dist/channels/teams/dispatch.d.ts +45 -0
  76. package/dist/channels/teams/dispatch.d.ts.map +1 -0
  77. package/dist/channels/teams/dispatch.js +402 -0
  78. package/dist/channels/teams/engagement.d.ts +32 -0
  79. package/dist/channels/teams/engagement.d.ts.map +1 -0
  80. package/dist/channels/teams/engagement.js +120 -0
  81. package/dist/channels/teams/index.d.ts +21 -0
  82. package/dist/channels/teams/index.d.ts.map +1 -0
  83. package/dist/channels/teams/index.js +19 -0
  84. package/dist/channels/teams/marks.d.ts +19 -0
  85. package/dist/channels/teams/marks.d.ts.map +1 -0
  86. package/dist/channels/teams/marks.js +96 -0
  87. package/dist/channels/teams/senders.d.ts +27 -0
  88. package/dist/channels/teams/senders.d.ts.map +1 -0
  89. package/dist/channels/teams/senders.js +72 -0
  90. package/dist/channels/teams/teams-channel.d.ts +43 -0
  91. package/dist/channels/teams/teams-channel.d.ts.map +1 -0
  92. package/dist/channels/teams/teams-channel.js +278 -0
  93. package/dist/channels/teams/text.d.ts +7 -0
  94. package/dist/channels/teams/text.d.ts.map +1 -0
  95. package/dist/channels/teams/text.js +63 -0
  96. package/dist/channels/teams/types.d.ts +306 -0
  97. package/dist/channels/teams/types.d.ts.map +1 -0
  98. package/dist/channels/teams/types.js +1 -0
  99. package/dist/channels.d.ts +31 -0
  100. package/dist/channels.d.ts.map +1 -1
  101. package/dist/channels.js +37 -0
  102. package/dist/connections.d.ts +1 -1
  103. package/dist/connections.d.ts.map +1 -1
  104. package/dist/docs/404.html +3 -3
  105. package/dist/docs/assets/{app.lt-BYgI2.js → app.CpLKJnOA.js} +4 -4
  106. package/dist/docs/assets/changelog.md.DoOgjnPC.js +1 -0
  107. package/dist/docs/assets/{changelog.md.DVNB-ApU.lean.js → changelog.md.DoOgjnPC.lean.js} +1 -1
  108. package/dist/docs/assets/chunks/@localSearchIndexroot.BJ_1eI6D.js +1 -0
  109. package/dist/docs/assets/chunks/{VPLocalSearchBox.v_dV4U2Q.js → VPLocalSearchBox.Cr1HJ_9k.js} +2 -2
  110. package/dist/docs/assets/chunks/{arc.5o92kOg5.js → arc.BjpgGAMM.js} +1 -1
  111. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.C-oTwnNq.js → architectureDiagram-Q4EWVU46.CKdhNPPk.js} +1 -1
  112. package/dist/docs/assets/chunks/{baseUniq.zJ-VNOib.js → baseUniq.iovoEQbg.js} +1 -1
  113. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.B9ZJZuPd.js → blockDiagram-DXYQGD6D.BYQIeDre.js} +1 -1
  114. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BBMwSIaN.js → c4Diagram-AHTNJAMY.gbWi2q8N.js} +1 -1
  115. package/dist/docs/assets/chunks/channel.BP0n324b.js +1 -0
  116. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.D8qAJpDD.js → chunk-4BX2VUAB.1Mem4UG9.js} +1 -1
  117. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.B8QR5cdE.js → chunk-4TB4RGXK.Dn3H-X_H.js} +1 -1
  118. package/dist/docs/assets/chunks/{chunk-55IACEB6.BsWxVuew.js → chunk-55IACEB6.BkpSDZwX.js} +1 -1
  119. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.BeGygY_i.js → chunk-EDXVE4YY.BScqy1zP.js} +1 -1
  120. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DdwgH-ZH.js → chunk-FMBD7UC4.Cp394LWf.js} +1 -1
  121. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.B9zC_ALe.js → chunk-OYMX7WX6.BDv9LhoL.js} +1 -1
  122. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BIxJ0rcL.js → chunk-QZHKN3VN.CsgCcrKO.js} +1 -1
  123. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.qiM_23_f.js → chunk-YZCP3GAM.BKBpIC5O.js} +1 -1
  124. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BhTtyWMA.js +1 -0
  125. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BhTtyWMA.js +1 -0
  126. package/dist/docs/assets/chunks/clone.BVK2rFqj.js +1 -0
  127. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BKB971D5.js → cose-bilkent-S5V4N54A.Bs3ZS9PC.js} +1 -1
  128. package/dist/docs/assets/chunks/{dagre-KV5264BT.CcILjJgp.js → dagre-KV5264BT.CgWi0tY2.js} +1 -1
  129. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DkY9A0nu.js → diagram-5BDNPKRD.rn6qIo9N.js} +1 -1
  130. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.BbdzmjMt.js → diagram-G4DWMVQ6.ChhW8oww.js} +1 -1
  131. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.Be0zy1cM.js → diagram-MMDJMWI5.C0wH5KSk.js} +1 -1
  132. package/dist/docs/assets/chunks/{diagram-TYMM5635.zOiEycLe.js → diagram-TYMM5635.CNEcrwA0.js} +1 -1
  133. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.DUd_9HMF.js → erDiagram-SMLLAGMA.DCsnKO-7.js} +1 -1
  134. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.2KPYoZBO.js → flowDiagram-DWJPFMVM.WCMkfvP0.js} +1 -1
  135. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.DqE8_YpP.js → ganttDiagram-T4ZO3ILL.BUb1Sxfr.js} +1 -1
  136. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CO0Tk47h.js → gitGraphDiagram-UUTBAWPF._kORbCzm.js} +1 -1
  137. package/dist/docs/assets/chunks/{graph.CNe5KbNy.js → graph.PrGRm4KW.js} +1 -1
  138. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.BBhJ1X1B.js → infoDiagram-42DDH7IO.BxhCjiQM.js} +1 -1
  139. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.KSIw9w3I.js → ishikawaDiagram-UXIWVN3A.5ddTis2y.js} +1 -1
  140. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BN2Y5oUJ.js → journeyDiagram-VCZTEJTY.BUStU27-.js} +1 -1
  141. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.2KFuDYn_.js → kanban-definition-6JOO6SKY.CJd1psl3.js} +1 -1
  142. package/dist/docs/assets/chunks/{layout.Demb_pzL.js → layout.DqvbZSML.js} +1 -1
  143. package/dist/docs/assets/chunks/{linear.kYKxzbbR.js → linear.DOmz-1UB.js} +1 -1
  144. package/dist/docs/assets/chunks/{min.DwmCN5dF.js → min.33k2v8dM.js} +1 -1
  145. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.CGlz01QG.js → mindmap-definition-QFDTVHPH.iISCqCXC.js} +1 -1
  146. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.n3qsq4nA.js → pieDiagram-DEJITSTG.BHvVgzmD.js} +1 -1
  147. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.CGNJ1GSb.js → quadrantDiagram-34T5L4WZ.CY3w_-Cn.js} +1 -1
  148. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.VhAzHDwQ.js → requirementDiagram-MS252O5E.CHXKQS1v.js} +1 -1
  149. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.DmHA5pW-.js → sankeyDiagram-XADWPNL6.DTtRoGss.js} +1 -1
  150. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23._TC1aKhg.js → sequenceDiagram-FGHM5R23.NnPcQ3eY.js} +1 -1
  151. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.B-kLjV3O.js → stateDiagram-FHFEXIEX.D8DFciH7.js} +1 -1
  152. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.ESAwmMws.js +1 -0
  153. package/dist/docs/assets/chunks/{theme.BaVlHHL-.js → theme.CwkiT-Fo.js} +2 -2
  154. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.CresbphV.js → timeline-definition-GMOUNBTQ._wIWkMU6.js} +1 -1
  155. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.CegHD8Y4.js → vennDiagram-DHZGUBPP.NLVv7R6r.js} +1 -1
  156. package/dist/docs/assets/chunks/{wardley-RL74JXVD.DjCmZrUO.js → wardley-RL74JXVD.DbsCXUZp.js} +1 -1
  157. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.BJ7s1zdZ.js → wardleyDiagram-NUSXRM2D.Dp5uAVDl.js} +1 -1
  158. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.IrEXlemI.js → xychartDiagram-5P7HB3ND.eOEBq4rX.js} +1 -1
  159. package/dist/docs/assets/{deployment.md.DJtuDVLh.js → deployment.md.CIRydNl3.js} +3 -3
  160. package/dist/docs/assets/{deployment.md.DJtuDVLh.lean.js → deployment.md.CIRydNl3.lean.js} +1 -1
  161. package/dist/docs/assets/guides_cloud-agents.md.BdWqmUGb.js +14 -0
  162. package/dist/docs/assets/{guides_cloud-agents.md.CiXAW6on.lean.js → guides_cloud-agents.md.BdWqmUGb.lean.js} +1 -1
  163. package/dist/docs/assets/guides_teams.md.7Lz2sbqB.js +50 -0
  164. package/dist/docs/assets/guides_teams.md.7Lz2sbqB.lean.js +1 -0
  165. package/dist/docs/assets/guides_workload-identity.md.DBV6YkXX.js +82 -0
  166. package/dist/docs/assets/guides_workload-identity.md.DBV6YkXX.lean.js +1 -0
  167. package/dist/docs/assets/{reference_agent-config.md.Bbqf0lgS.js → reference_agent-config.md.CfM1S6Ac.js} +2 -2
  168. package/dist/docs/assets/{reference_agent-config.md.Bbqf0lgS.lean.js → reference_agent-config.md.CfM1S6Ac.lean.js} +1 -1
  169. package/dist/docs/assets/{reference_channels.md.CPWOpdsC.js → reference_channels.md.CRvqgU0n.js} +1 -1
  170. package/dist/docs/assets/{reference_cli.md.DHm6DmYk.js → reference_cli.md.NS6U5a-7.js} +14 -4
  171. package/dist/docs/assets/{reference_cli.md.DHm6DmYk.lean.js → reference_cli.md.NS6U5a-7.lean.js} +1 -1
  172. package/dist/docs/assets/{reference_limits.md.CbdtFr4T.js → reference_limits.md.CW9PTdxr.js} +3 -3
  173. package/dist/docs/assets/{reference_limits.md.CbdtFr4T.lean.js → reference_limits.md.CW9PTdxr.lean.js} +1 -1
  174. package/dist/docs/assets/{reference_schedules.md.RhQ9ZLo1.js → reference_schedules.md.Dd8_d0WG.js} +3 -3
  175. package/dist/docs/assets/{reference_sessions.md.NXVQt9mP.js → reference_sessions.md.CoCyQLEz.js} +2 -2
  176. package/dist/docs/assets/{reference_sessions.md.NXVQt9mP.lean.js → reference_sessions.md.CoCyQLEz.lean.js} +1 -1
  177. package/dist/docs/assets/{reference_skills.md.DzCPNPkG.js → reference_skills.md.SFRZDC41.js} +4 -4
  178. package/dist/docs/assets/{reference_skills.md.DzCPNPkG.lean.js → reference_skills.md.SFRZDC41.lean.js} +1 -1
  179. package/dist/docs/assets/{style.DK0YX1WL.css → style.B7zPxANR.css} +1 -1
  180. package/dist/docs/assets/troubleshooting.md.CsQTleto.js +3 -0
  181. package/dist/docs/assets/{troubleshooting.md.DfKKvW1R.lean.js → troubleshooting.md.CsQTleto.lean.js} +1 -1
  182. package/dist/docs/building-with-agents.html +37 -37
  183. package/dist/docs/changelog.html +37 -37
  184. package/dist/docs/changelog.md +43 -0
  185. package/dist/docs/deployment.html +40 -40
  186. package/dist/docs/deployment.md +14 -0
  187. package/dist/docs/evals.html +37 -37
  188. package/dist/docs/guides/agent-to-agent.html +37 -37
  189. package/dist/docs/guides/bitbucket.html +37 -37
  190. package/dist/docs/guides/cloud-agents.html +43 -38
  191. package/dist/docs/guides/cloud-agents.md +47 -0
  192. package/dist/docs/guides/convert-automation.html +37 -37
  193. package/dist/docs/guides/github.html +37 -37
  194. package/dist/docs/guides/gitlab.html +37 -37
  195. package/dist/docs/guides/improve.html +37 -37
  196. package/dist/docs/guides/jev.html +37 -37
  197. package/dist/docs/guides/mcp-oauth.html +37 -37
  198. package/dist/docs/guides/migrate.html +37 -37
  199. package/dist/docs/guides/opentelemetry.html +37 -37
  200. package/dist/docs/guides/pagerduty.html +37 -37
  201. package/dist/docs/guides/slack.html +37 -37
  202. package/dist/docs/guides/teams.html +109 -0
  203. package/dist/docs/guides/teams.md +384 -0
  204. package/dist/docs/guides/webhooks.html +37 -37
  205. package/dist/docs/guides/workload-identity.html +141 -0
  206. package/dist/docs/guides/workload-identity.md +227 -0
  207. package/dist/docs/hashmap.json +1 -1
  208. package/dist/docs/hillclimbing.html +37 -37
  209. package/dist/docs/index.html +37 -37
  210. package/dist/docs/llms-full.txt +881 -5
  211. package/dist/docs/llms.txt +2 -0
  212. package/dist/docs/quickstart.html +37 -37
  213. package/dist/docs/reference/access.html +36 -36
  214. package/dist/docs/reference/agent-config.html +39 -39
  215. package/dist/docs/reference/agent-config.md +1 -1
  216. package/dist/docs/reference/artifacts.html +37 -37
  217. package/dist/docs/reference/channels.html +38 -38
  218. package/dist/docs/reference/channels.md +1 -0
  219. package/dist/docs/reference/cli.html +50 -40
  220. package/dist/docs/reference/cli.md +116 -0
  221. package/dist/docs/reference/connections.html +37 -37
  222. package/dist/docs/reference/evals.html +37 -37
  223. package/dist/docs/reference/extensions.html +37 -37
  224. package/dist/docs/reference/hooks.html +37 -37
  225. package/dist/docs/reference/http-api.html +37 -37
  226. package/dist/docs/reference/instructions.html +37 -37
  227. package/dist/docs/reference/limits.html +39 -39
  228. package/dist/docs/reference/limits.md +4 -4
  229. package/dist/docs/reference/memory.html +37 -37
  230. package/dist/docs/reference/playground.html +36 -36
  231. package/dist/docs/reference/project-layout.html +37 -37
  232. package/dist/docs/reference/schedules.html +40 -40
  233. package/dist/docs/reference/sessions.html +38 -38
  234. package/dist/docs/reference/sessions.md +13 -0
  235. package/dist/docs/reference/skills.html +40 -40
  236. package/dist/docs/reference/subagents.html +37 -37
  237. package/dist/docs/reference/tools.html +37 -37
  238. package/dist/docs/templates/agentic-owners.html +37 -37
  239. package/dist/docs/templates/reviews.html +37 -37
  240. package/dist/docs/troubleshooting.html +38 -38
  241. package/dist/docs/troubleshooting.md +21 -0
  242. package/dist/evals/run-facts.d.ts.map +1 -1
  243. package/dist/evals/run-facts.js +4 -0
  244. package/dist/extensions/cursor-cloud-agents/channels/cursor-cloud-agents.d.ts +12 -0
  245. package/dist/extensions/cursor-cloud-agents/channels/cursor-cloud-agents.d.ts.map +1 -0
  246. package/dist/extensions/cursor-cloud-agents/channels/cursor-cloud-agents.js +42 -0
  247. package/dist/extensions/cursor-cloud-agents/extension.d.ts +10 -7
  248. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  249. package/dist/extensions/cursor-cloud-agents/extension.js +3 -2
  250. package/dist/extensions/cursor-cloud-agents/lib/agent-id.d.ts +5 -0
  251. package/dist/extensions/cursor-cloud-agents/lib/agent-id.d.ts.map +1 -0
  252. package/dist/extensions/cursor-cloud-agents/lib/agent-id.js +10 -0
  253. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +57 -3
  254. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
  255. package/dist/extensions/cursor-cloud-agents/lib/backend.js +150 -35
  256. package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts +32 -4
  257. package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts.map +1 -1
  258. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +93 -7
  259. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +24 -7
  260. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -1
  261. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +158 -25
  262. package/dist/extensions/cursor-cloud-agents/lib/stop-signal.d.ts +18 -0
  263. package/dist/extensions/cursor-cloud-agents/lib/stop-signal.d.ts.map +1 -0
  264. package/dist/extensions/cursor-cloud-agents/lib/stop-signal.js +27 -0
  265. package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -1
  266. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -3
  267. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts +26 -12
  268. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -1
  269. package/dist/extensions/cursor-cloud-agents/lib/watch.js +115 -46
  270. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts +16 -5
  271. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts.map +1 -1
  272. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +76 -20
  273. package/dist/extensions/cursor-cloud-agents/skills/handoff.md +2 -2
  274. package/dist/extensions/cursor-cloud-agents/tools/get.js +2 -2
  275. package/dist/extensions/cursor-cloud-agents/tools/launch.js +1 -1
  276. package/dist/extensions.d.ts.map +1 -1
  277. package/dist/extensions.js +18 -3
  278. package/dist/files-backends/agent-store-presigned-url.js +5 -1
  279. package/dist/index.d.ts +1 -0
  280. package/dist/index.d.ts.map +1 -1
  281. package/dist/index.js +1 -0
  282. package/dist/internal/approval-gate.d.ts +6 -1
  283. package/dist/internal/approval-gate.d.ts.map +1 -1
  284. package/dist/internal/approval-gate.js +13 -2
  285. package/dist/internal/authored-loaders.js +1 -1
  286. package/dist/internal/channel-architecture.d.ts.map +1 -1
  287. package/dist/internal/channel-architecture.js +3 -1
  288. package/dist/internal/cli/commands/channels.d.ts +9 -3
  289. package/dist/internal/cli/commands/channels.d.ts.map +1 -1
  290. package/dist/internal/cli/commands/channels.js +193 -4
  291. package/dist/internal/cli/commands/index.d.ts.map +1 -1
  292. package/dist/internal/cli/commands/index.js +6 -1
  293. package/dist/internal/cli/commands/serve.d.ts.map +1 -1
  294. package/dist/internal/cli/commands/serve.js +25 -5
  295. package/dist/internal/cli/dispatch.d.ts.map +1 -1
  296. package/dist/internal/cli/dispatch.js +22 -8
  297. package/dist/internal/cli/flags.d.ts +14 -0
  298. package/dist/internal/cli/flags.d.ts.map +1 -1
  299. package/dist/internal/cli/flags.js +14 -0
  300. package/dist/internal/cli/help.d.ts.map +1 -1
  301. package/dist/internal/cli/help.js +3 -1
  302. package/dist/internal/cli-ax.d.ts.map +1 -1
  303. package/dist/internal/cli-ax.js +6 -3
  304. package/dist/internal/cli-cursor.js +2 -2
  305. package/dist/internal/cli-deploy.d.ts +1 -0
  306. package/dist/internal/cli-deploy.d.ts.map +1 -1
  307. package/dist/internal/cli-deploy.js +19 -1
  308. package/dist/internal/cli-mcp.d.ts.map +1 -1
  309. package/dist/internal/cli-mcp.js +5 -3
  310. package/dist/internal/cli-teams-doctor.d.ts +39 -0
  311. package/dist/internal/cli-teams-doctor.d.ts.map +1 -0
  312. package/dist/internal/cli-teams-doctor.js +508 -0
  313. package/dist/internal/cli-teams-forward.d.ts +84 -0
  314. package/dist/internal/cli-teams-forward.d.ts.map +1 -0
  315. package/dist/internal/cli-teams-forward.js +386 -0
  316. package/dist/internal/cli-teams-package.d.ts +26 -0
  317. package/dist/internal/cli-teams-package.d.ts.map +1 -0
  318. package/dist/internal/cli-teams-package.js +123 -0
  319. package/dist/internal/cli-teams.d.ts +15 -0
  320. package/dist/internal/cli-teams.d.ts.map +1 -0
  321. package/dist/internal/cli-teams.js +253 -0
  322. package/dist/internal/connect-click.d.ts +12 -0
  323. package/dist/internal/connect-click.d.ts.map +1 -0
  324. package/dist/internal/connect-click.js +22 -0
  325. package/dist/internal/continuation-channel.d.ts +5 -1
  326. package/dist/internal/continuation-channel.d.ts.map +1 -1
  327. package/dist/internal/continuation-channel.js +34 -0
  328. package/dist/internal/continuation-identity.d.ts +7 -4
  329. package/dist/internal/continuation-identity.d.ts.map +1 -1
  330. package/dist/internal/continuation-identity.js +66 -1
  331. package/dist/internal/convert-automation/convert-workflow.js +2 -2
  332. package/dist/internal/credential-env-names.d.ts +36 -0
  333. package/dist/internal/credential-env-names.d.ts.map +1 -0
  334. package/dist/internal/credential-env-names.js +68 -0
  335. package/dist/internal/cursor/account-mcp.d.ts +67 -9
  336. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  337. package/dist/internal/cursor/account-mcp.js +206 -25
  338. package/dist/internal/cursor/backend-client.d.ts +10 -1
  339. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  340. package/dist/internal/cursor/backend-client.js +19 -7
  341. package/dist/internal/cursor/cloud-agent-identity.d.ts +81 -0
  342. package/dist/internal/cursor/cloud-agent-identity.d.ts.map +1 -0
  343. package/dist/internal/cursor/cloud-agent-identity.js +224 -0
  344. package/dist/internal/cursor/credentials.d.ts.map +1 -1
  345. package/dist/internal/cursor/credentials.js +3 -1
  346. package/dist/internal/cursor-account-mcp-auth.d.ts +8 -1
  347. package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -1
  348. package/dist/internal/cursor-account-mcp-auth.js +22 -6
  349. package/dist/internal/deploy-client.d.ts.map +1 -1
  350. package/dist/internal/deploy-client.js +34 -2
  351. package/dist/internal/deploy-manifest.d.ts +51 -3
  352. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  353. package/dist/internal/deploy-manifest.js +96 -7
  354. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  355. package/dist/internal/discovery/agent-config.js +6 -1
  356. package/dist/internal/discovery/agent.d.ts.map +1 -1
  357. package/dist/internal/discovery/agent.js +2 -1
  358. package/dist/internal/discovery/connections.d.ts +5 -0
  359. package/dist/internal/discovery/connections.d.ts.map +1 -1
  360. package/dist/internal/discovery/connections.js +71 -1
  361. package/dist/internal/discovery/extensions.d.ts.map +1 -1
  362. package/dist/internal/discovery/extensions.js +2 -0
  363. package/dist/internal/discovery/info.d.ts.map +1 -1
  364. package/dist/internal/discovery/info.js +4 -0
  365. package/dist/internal/env-file.d.ts +1 -0
  366. package/dist/internal/env-file.d.ts.map +1 -1
  367. package/dist/internal/env-file.js +18 -17
  368. package/dist/internal/env-prefix.d.ts +11 -0
  369. package/dist/internal/env-prefix.d.ts.map +1 -0
  370. package/dist/internal/env-prefix.js +23 -0
  371. package/dist/internal/event-id-dedupe.d.ts +12 -0
  372. package/dist/internal/event-id-dedupe.d.ts.map +1 -0
  373. package/dist/{channels/slack → internal}/event-id-dedupe.js +7 -4
  374. package/dist/internal/event-mapper.d.ts +7 -2
  375. package/dist/internal/event-mapper.d.ts.map +1 -1
  376. package/dist/internal/event-mapper.js +7 -0
  377. package/dist/internal/expected-delivery-failure.d.ts.map +1 -1
  378. package/dist/internal/expected-delivery-failure.js +3 -0
  379. package/dist/internal/extension-namespace.d.ts +9 -0
  380. package/dist/internal/extension-namespace.d.ts.map +1 -0
  381. package/dist/internal/extension-namespace.js +14 -0
  382. package/dist/internal/guid.d.ts +2 -0
  383. package/dist/internal/guid.d.ts.map +1 -0
  384. package/dist/internal/guid.js +4 -0
  385. package/dist/internal/host-kv-cas.d.ts +13 -0
  386. package/dist/internal/host-kv-cas.d.ts.map +1 -0
  387. package/dist/internal/host-kv-cas.js +26 -0
  388. package/dist/internal/host-kv.d.ts +4 -1
  389. package/dist/internal/host-kv.d.ts.map +1 -1
  390. package/dist/internal/host-kv.js +15 -2
  391. package/dist/internal/hosted-catch-protocol.d.ts +5 -0
  392. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  393. package/dist/internal/hosted-catch-protocol.js +5 -0
  394. package/dist/internal/hosted-catch.d.ts +2 -0
  395. package/dist/internal/hosted-catch.d.ts.map +1 -1
  396. package/dist/internal/hosted-catch.js +6 -1
  397. package/dist/internal/hosted-delivery-protocol.d.ts +4 -0
  398. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  399. package/dist/internal/hosted-delivery-protocol.js +73 -3
  400. package/dist/internal/hosted-delivery.d.ts +9 -3
  401. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  402. package/dist/internal/hosted-delivery.js +14 -3
  403. package/dist/internal/hosted-session-fixture.js +1 -1
  404. package/dist/internal/hosting.d.ts +5 -0
  405. package/dist/internal/hosting.d.ts.map +1 -1
  406. package/dist/internal/hosting.js +7 -1
  407. package/dist/internal/ids.d.ts +2 -0
  408. package/dist/internal/ids.d.ts.map +1 -1
  409. package/dist/internal/ids.js +5 -0
  410. package/dist/internal/install-cursor-skills.d.ts +6 -7
  411. package/dist/internal/install-cursor-skills.d.ts.map +1 -1
  412. package/dist/internal/install-cursor-skills.js +15 -9
  413. package/dist/internal/interview/agent-questions.d.ts +1 -1
  414. package/dist/internal/interview/agent-questions.d.ts.map +1 -1
  415. package/dist/internal/interview/agent-questions.js +4 -3
  416. package/dist/internal/local-control-plane.d.ts.map +1 -1
  417. package/dist/internal/local-control-plane.js +24 -0
  418. package/dist/internal/mcp-allowlist-in-use.d.ts +23 -0
  419. package/dist/internal/mcp-allowlist-in-use.d.ts.map +1 -0
  420. package/dist/internal/mcp-allowlist-in-use.js +93 -0
  421. package/dist/internal/mcp-endpoint.d.ts.map +1 -1
  422. package/dist/internal/mcp-endpoint.js +8 -10
  423. package/dist/internal/mcp-host.d.ts +19 -1
  424. package/dist/internal/mcp-host.d.ts.map +1 -1
  425. package/dist/internal/mcp-host.js +67 -3
  426. package/dist/internal/mcp-oauth.d.ts.map +1 -1
  427. package/dist/internal/mcp-oauth.js +5 -7
  428. package/dist/internal/oidcAudiences.d.ts +22 -0
  429. package/dist/internal/oidcAudiences.d.ts.map +1 -0
  430. package/dist/internal/oidcAudiences.js +35 -0
  431. package/dist/internal/otel/collector.d.ts.map +1 -1
  432. package/dist/internal/otel/collector.js +2 -0
  433. package/dist/internal/platform-timers.d.ts +2 -0
  434. package/dist/internal/platform-timers.d.ts.map +1 -1
  435. package/dist/internal/platform-timers.js +14 -0
  436. package/dist/internal/private-file.d.ts +32 -1
  437. package/dist/internal/private-file.d.ts.map +1 -1
  438. package/dist/internal/private-file.js +209 -7
  439. package/dist/internal/redact-values.d.ts +3 -0
  440. package/dist/internal/redact-values.d.ts.map +1 -0
  441. package/dist/internal/redact-values.js +19 -0
  442. package/dist/internal/reminder-control-plane-protocol.d.ts +7 -1
  443. package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
  444. package/dist/internal/reminder-followup-error.d.ts +23 -0
  445. package/dist/internal/reminder-followup-error.d.ts.map +1 -0
  446. package/dist/internal/reminder-followup-error.js +12 -0
  447. package/dist/internal/reminder-runner.d.ts +15 -1
  448. package/dist/internal/reminder-runner.d.ts.map +1 -1
  449. package/dist/internal/reminder-runner.js +95 -21
  450. package/dist/internal/resolved-connections.d.ts.map +1 -1
  451. package/dist/internal/resolved-connections.js +23 -3
  452. package/dist/internal/run-client.js +2 -1
  453. package/dist/internal/run-program.d.ts +31 -0
  454. package/dist/internal/run-program.d.ts.map +1 -0
  455. package/dist/internal/run-program.js +150 -0
  456. package/dist/internal/schedule-runner.d.ts +1 -0
  457. package/dist/internal/schedule-runner.d.ts.map +1 -1
  458. package/dist/internal/schedule-runner.js +10 -1
  459. package/dist/internal/sdk-runner.d.ts +28 -2
  460. package/dist/internal/sdk-runner.d.ts.map +1 -1
  461. package/dist/internal/sdk-runner.js +298 -38
  462. package/dist/internal/server.d.ts.map +1 -1
  463. package/dist/internal/server.js +53 -8
  464. package/dist/internal/session-credential.d.ts +14 -0
  465. package/dist/internal/session-credential.d.ts.map +1 -0
  466. package/dist/internal/session-credential.js +25 -0
  467. package/dist/internal/session-engine.d.ts +140 -6
  468. package/dist/internal/session-engine.d.ts.map +1 -1
  469. package/dist/internal/session-engine.js +583 -93
  470. package/dist/internal/storage-coordinator.d.ts +3 -1
  471. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  472. package/dist/internal/storage-coordinator.js +13 -0
  473. package/dist/internal/storage-roles.d.ts +9 -1
  474. package/dist/internal/storage-roles.d.ts.map +1 -1
  475. package/dist/internal/teams-channel-profile.d.ts +41 -0
  476. package/dist/internal/teams-channel-profile.d.ts.map +1 -0
  477. package/dist/internal/teams-channel-profile.js +91 -0
  478. package/dist/internal/teams-devtunnel.d.ts +55 -0
  479. package/dist/internal/teams-devtunnel.d.ts.map +1 -0
  480. package/dist/internal/teams-devtunnel.js +205 -0
  481. package/dist/internal/teams-tunnel-proxy.d.ts +17 -0
  482. package/dist/internal/teams-tunnel-proxy.d.ts.map +1 -0
  483. package/dist/internal/teams-tunnel-proxy.js +100 -0
  484. package/dist/internal/testing/conversation-identity-vectors.d.ts +7 -1
  485. package/dist/internal/testing/conversation-identity-vectors.d.ts.map +1 -1
  486. package/dist/internal/testing/conversation-identity-vectors.js +67 -0
  487. package/dist/internal/testing/hosted-http.d.ts +15 -0
  488. package/dist/internal/testing/hosted-http.d.ts.map +1 -0
  489. package/dist/internal/testing/hosted-http.js +86 -0
  490. package/dist/internal/testing/teams-activity-fixtures.d.ts +28 -0
  491. package/dist/internal/testing/teams-activity-fixtures.d.ts.map +1 -0
  492. package/dist/internal/testing/teams-activity-fixtures.js +236 -0
  493. package/dist/internal/testing/teams-doctor-fixtures.d.ts +76 -0
  494. package/dist/internal/testing/teams-doctor-fixtures.d.ts.map +1 -0
  495. package/dist/internal/testing/teams-doctor-fixtures.js +216 -0
  496. package/dist/internal/tunnel-process.d.ts +29 -0
  497. package/dist/internal/tunnel-process.d.ts.map +1 -0
  498. package/dist/internal/tunnel-process.js +105 -0
  499. package/dist/internal/turn-context.d.ts +28 -0
  500. package/dist/internal/turn-context.d.ts.map +1 -0
  501. package/dist/internal/turn-context.js +1 -0
  502. package/dist/oidc-token.d.ts +131 -0
  503. package/dist/oidc-token.d.ts.map +1 -0
  504. package/dist/oidc-token.js +221 -0
  505. package/dist/playground/assets/chunk-YOKDWASO-BPO_8GRX.js +115 -0
  506. package/dist/playground/assets/highlighted-body-KPVGNVTW-CxEV-T_f.js +1 -0
  507. package/dist/playground/assets/index-CjFJhCtb.js +62 -0
  508. package/dist/playground/assets/index-vwUVwmk8.css +1 -0
  509. package/dist/playground/assets/mermaid-HWGCJPDP-eK-fpbFn.js +1 -0
  510. package/dist/playground/index.html +2 -2
  511. package/dist/teams-app-package.d.ts +78 -0
  512. package/dist/teams-app-package.d.ts.map +1 -0
  513. package/dist/teams-app-package.js +204 -0
  514. package/dist/tools.d.ts +1 -1
  515. package/dist/tools.d.ts.map +1 -1
  516. package/dist/types.d.ts +271 -2
  517. package/dist/types.d.ts.map +1 -1
  518. package/docs/changelog.md +43 -0
  519. package/docs/deployment.md +14 -0
  520. package/docs/guides/cloud-agents.md +47 -0
  521. package/docs/guides/teams.md +389 -0
  522. package/docs/guides/workload-identity.md +232 -0
  523. package/docs/reference/agent-config.md +1 -1
  524. package/docs/reference/channels.md +1 -0
  525. package/docs/reference/cli.md +116 -0
  526. package/docs/reference/limits.md +4 -4
  527. package/docs/reference/sessions.md +13 -0
  528. package/docs/troubleshooting.md +21 -0
  529. package/package.json +23 -46
  530. package/skills/create-agent/SKILL.md +17 -4
  531. package/skills/debug/SKILL.md +1 -0
  532. package/skills/deploy/SKILL.md +1 -1
  533. package/skills/framework-map/SKILL.md +1 -0
  534. package/skills/setup-teams/SKILL.md +141 -0
  535. package/templates/agentic-owners/bot/lib/owners/parse.ts +1 -0
  536. package/dist/channels/slack/event-id-dedupe.d.ts +0 -10
  537. package/dist/channels/slack/event-id-dedupe.d.ts.map +0 -1
  538. package/dist/docs/assets/changelog.md.DVNB-ApU.js +0 -1
  539. package/dist/docs/assets/chunks/@localSearchIndexroot.DdlR-9Oe.js +0 -1
  540. package/dist/docs/assets/chunks/channel.CdyTxaXV.js +0 -1
  541. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CeUcN6TW.js +0 -1
  542. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CeUcN6TW.js +0 -1
  543. package/dist/docs/assets/chunks/clone.DpIwUbur.js +0 -1
  544. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.HtBkUH4J.js +0 -1
  545. package/dist/docs/assets/guides_cloud-agents.md.CiXAW6on.js +0 -9
  546. package/dist/docs/assets/troubleshooting.md.DfKKvW1R.js +0 -3
  547. package/dist/playground/assets/index-CnFd5R1_.js +0 -62
  548. package/dist/playground/assets/index-DNzRv6G8.css +0 -1
  549. /package/dist/docs/assets/{reference_channels.md.CPWOpdsC.lean.js → reference_channels.md.CRvqgU0n.lean.js} +0 -0
  550. /package/dist/docs/assets/{reference_schedules.md.RhQ9ZLo1.lean.js → reference_schedules.md.Dd8_d0WG.lean.js} +0 -0
@@ -54,6 +54,49 @@ Source: /docs/changelog.md
54
54
 
55
55
  # Changelog
56
56
 
57
+ ## 0.7.1 (2026-11-20)
58
+
59
+ ### Fixes
60
+
61
+ - On Cursor hosting, scheduled runs record trace events under the platform session id so they appear in the Trace tab. Before, scheduled runs wrote traces under a local id and the Trace tab stayed empty.
62
+ - GitHub and Origin `cursorAccount` connections ignore GitLab and Bitbucket repository entries in the shared event list instead of failing startup.
63
+ - `cursorAccount` MCP server name matching trims surrounding whitespace on server names and identifiers and rejects blank names.
64
+
65
+ ## 0.7.0 (2026-11-19)
66
+
67
+ ### Minimum versions
68
+
69
+ - `@grok/agent-sdk` requires `@cursor/sdk` 1.4.2, so each model call's usage arrives as a `model_call.completed` event.
70
+
71
+ ### Behavior changes
72
+
73
+ - 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.
74
+ - 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.
75
+ - 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.
76
+ - 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.
77
+ - 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.
78
+
79
+ ### New
80
+
81
+ - `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.
82
+ - `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.
83
+ - `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`.
84
+ - `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.
85
+ - `ReminderHostApi.fireNow(id)` fires an armed reminder as soon as the platform can, through its normal claim.
86
+ - `Extension.namespace` is the namespace an agent mounted the extension under, for a tree that names its own `<ns>__<name>` contributions.
87
+ - `ReminderHostApi.createRequest(input)` returns the request that `create` would send, validated the same way, without creating the reminder.
88
+ - `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`.
89
+
90
+ ### Fixes
91
+
92
+ - 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.
93
+ - 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.
94
+ - 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.
95
+ - In Slack, images in a reply that arrives while a turn runs reach the follow-up turn. Before, only the reply's text did.
96
+ - 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.
97
+ - 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.
98
+ - On an HTTP 403, `agent-sdk deploy` prints the server's reason instead of guessing a cause.
99
+
57
100
  ## 0.6.0 (2026-11-03)
58
101
 
59
102
  ### Minimum versions
@@ -206,6 +249,10 @@ handler, tool, or callback that needs it. Give an MCP connection a
206
249
  [`${NAME}` template](/docs/reference/connections.md#credentials-in-headers-and-env)
207
250
  instead.
208
251
 
252
+ To authenticate with cloud providers or external services without static
253
+ keys, declare `hosting.oidc.audiences` and mint short-lived JWTs with
254
+ `getOidcToken`. See [Workload identity (OIDC)](/docs/guides/workload-identity.md).
255
+
209
256
  SCM channels take each credential as a named secret, such as
210
257
  `{ secretName: "GITHUB_WEBHOOK_SECRET" }`. The channel reads the environment
211
258
  variable with that name locally and the deployment secret on Cursor hosting.
@@ -297,6 +344,16 @@ the deployment watches only its GitHub source repository. Run
297
344
  Sessions, `ctx.host.kv`, and `ctx.host.files` survive restarts and
298
345
  redeploys. Anything else the agent writes to disk can disappear.
299
346
 
347
+ ## Startup runs before secrets are available
348
+
349
+ A hosted deploy starts your agent once to take a snapshot, before its
350
+ secrets, including `CURSOR_API_KEY`, are available. They arrive when a
351
+ session starts.
352
+ Do not call the Cursor API, hosted storage, or reminders at startup. Call
353
+ them from a handler. Startup log lines such as `requires CURSOR_API_KEY
354
+ (deployment pod credential on Cursor hosting)` come from this step and are
355
+ expected.
356
+
300
357
  ## Self-host securely
301
358
 
302
359
  Run Agent SDK under Node 22.13 or newer, never Bun. One process can serve
@@ -884,6 +941,53 @@ caller uses the same bearer token, the extension treats them all as one person.
884
941
  Use [authored auth](/docs/reference/channels.md#auth-policies) to keep callers
885
942
  apart.
886
943
 
944
+ When a cloud agent the conversation launched stops, the extension wakes that
945
+ conversation once. The wake message gives the agent id and its status, and
946
+ tells the model to call `cloud__get`. That tool returns the agent's `result`,
947
+ the final answer of its latest run.
948
+
949
+ On Cursor hosting, the wake comes when the agent's run stops. This includes a
950
+ run that someone else cancels. If the wake does not reach the conversation,
951
+ the extension tries again every minute, up to 10 times. You configure nothing
952
+ for this.
953
+
954
+ Nothing polls the agent. If no wake comes, ask the bot to check the agent with
955
+ `cloud__get`. A stop in the middle of a turn does not wake the conversation
956
+ yet. The extension stops waiting for a wake after 24 hours.
957
+
958
+ Some launches get no wake: launches off Cursor hosting, launches from a mount
959
+ that sets its own `apiKey`, and launches with `envVars`. A launch that Cursor
960
+ hosting cannot watch also gets no wake. For these launches, the launch result
961
+ says `watching: false`. Ask the bot to check the agent when you need its
962
+ result.
963
+
964
+ ## Read a result from your code
965
+
966
+ Your own code, such as a tool or a reminder, can launch a cloud agent with
967
+ `launchCloudAgent` and read it back with `getCloudAgent`. When the agent has
968
+ stopped and its latest run finished, `result` holds the final answer of that
969
+ run. An errored or expired run has no `result`. Ask the agent to end with its
970
+ report or its JSON, and parse `result`.
971
+
972
+ ```ts
973
+ import { getCloudAgent } from "@grok/agent-sdk/extensions/cursor-cloud-agents";
974
+
975
+ const agent = await getCloudAgent(agentId);
976
+ if (agent.status === "finished" && agent.result !== undefined) {
977
+ const report = JSON.parse(agent.result);
978
+ }
979
+ ```
980
+
981
+ `getCloudAgent` does not check who launched the agent. Pass only ids that your
982
+ code launched, never an id that a model chose.
983
+
984
+ `launchCloudAgent` takes an optional `agentId`, a `bc-<uuid>`. When you omit
985
+ it, the extension makes one. To retry a launch that timed out or failed, pass
986
+ the same `agentId` again. If the first launch created the agent, you get that
987
+ agent back and no second agent starts. The extension returns an existing agent
988
+ only when this principal launched it through the extension. A launch with
989
+ `cloud.envVars` cannot take an `agentId`.
990
+
887
991
  ## Configure it
888
992
 
889
993
  | Option | What it controls |
@@ -2622,6 +2726,395 @@ follow the `agent-sdk-setup-slack` skill for installation and tokens.
2622
2726
 
2623
2727
  ---
2624
2728
 
2729
+ Source: /docs/guides/teams.md
2730
+
2731
+ # Microsoft Teams agents
2732
+
2733
+ A Teams agent wakes when someone @mentions it in a channel or group chat,
2734
+ messages it in a personal chat, or posts in a channel it watches. It
2735
+ answers in the same reply chain. `teamsChannel()` takes the same engagement options as
2736
+ `slackChannel()`, so an agent that already runs in Slack can run in Teams
2737
+ with the same shape of config.
2738
+
2739
+ The agent answers as an Azure Bot that you register and own. Teams sends
2740
+ each message to the bot's messaging endpoint, and the channel checks the
2741
+ Bot Framework token on every request before it starts a turn.
2742
+
2743
+ ## Set up with the CLI
2744
+
2745
+ The `agent-sdk channels teams` commands do every step except the clicks in
2746
+ the Azure portal and in Teams:
2747
+
2748
+ ```bash
2749
+ agent-sdk channels teams setup
2750
+ printf %s "$CLIENT_SECRET" | agent-sdk channels teams init --dir ./helm \
2751
+ --app-id <microsoft-app-id> --tenant-id <app-tenant-id>
2752
+ agent-sdk channels teams package --dir ./helm
2753
+ agent-sdk dev ./helm
2754
+ agent-sdk channels teams doctor --dir ./helm --endpoint <printed URL>
2755
+ ```
2756
+
2757
+ 1. `setup` prints the Azure portal steps in
2758
+ [Register the Azure Bot](#register-the-azure-bot).
2759
+ 2. `init` writes `bot/channels/teams.ts` and puts the app id, the client
2760
+ secret, and the tenant id in `.env.local`. It reads the secret from a
2761
+ hidden prompt or stdin, never from an argument.
2762
+ 3. `package` writes `helm-teams-app.zip`. Upload it in Teams, as
2763
+ [Install the bot in Teams](#install-the-bot-in-teams) describes.
2764
+ 4. `dev` opens a tunnel and prints the messaging endpoint. Set it on the
2765
+ Azure Bot.
2766
+ 5. `doctor` checks the env names, the token, the Azure Bot, and the
2767
+ endpoint, and names the part that fails.
2768
+
2769
+ The [CLI reference](/docs/reference/cli.md#teams) lists every flag. The rest of
2770
+ this guide explains what the commands write and how the channel behaves.
2771
+
2772
+ ## Answer a mention or personal chat
2773
+
2774
+ ```ts
2775
+ // bot/channels/teams.ts
2776
+ import { teamsChannel } from "@grok/agent-sdk/channels/teams";
2777
+
2778
+ export default teamsChannel();
2779
+ ```
2780
+
2781
+ By default the agent answers @mentions in channels and group chats, and
2782
+ every message in a personal chat. While a turn runs, Teams shows the
2783
+ typing indicator, and the reply arrives as one message in the reply chain.
2784
+ In a channel, each reply chain is its own conversation. A personal chat
2785
+ and a group chat have no reply chains, so each one is a single
2786
+ conversation.
2787
+
2788
+ The channel reads three variables:
2789
+
2790
+ | Variable | Value |
2791
+ | --- | --- |
2792
+ | `TEAMS_APP_ID` | The Azure Bot's Microsoft App ID |
2793
+ | `TEAMS_APP_PASSWORD` | A client secret of that app registration |
2794
+ | `TEAMS_TENANT_ID` | Required. The home tenant of your single-tenant Azure Bot |
2795
+
2796
+ The Azure Bot is a single-tenant bot in your own tenant, because Azure
2797
+ does not create new multi-tenant bots after July 31, 2025. The channel
2798
+ mints its Bot Connector token in that tenant and ignores activities from
2799
+ any other tenant. To run several
2800
+ agents in one `agent-sdk dev`, give each its own bot and an `envPrefix`.
2801
+ `channels teams init --prefix HELPDESK` writes it for you. The prefix
2802
+ starts with a letter.
2803
+
2804
+ ```ts
2805
+ export default teamsChannel({ envPrefix: "HELPDESK" });
2806
+ // HELPDESK_TEAMS_APP_ID, HELPDESK_TEAMS_APP_PASSWORD, HELPDESK_TEAMS_TENANT_ID
2807
+ ```
2808
+
2809
+ The channel file owns these names. When the file exists, `init` writes the
2810
+ names it reads, and `doctor` and `package` read them from the loaded
2811
+ channel.
2812
+
2813
+ ## Register the Azure Bot
2814
+
2815
+ 1. In the Azure portal, create an **Azure Bot** resource. Set **Type of
2816
+ App** to **Single Tenant** and **Creation type** to **Create new
2817
+ Microsoft App ID**.
2818
+ 2. Open the bot's **Configuration** page. Copy **Microsoft App ID** and
2819
+ **App Tenant ID**. `init` takes them as `--app-id` and `--tenant-id`.
2820
+ 3. From **Configuration**, open **Manage Password**, add a client secret,
2821
+ and copy its value. Azure shows the value once. `init` reads it from
2822
+ the hidden prompt or stdin.
2823
+ 4. Under **Channels**, add **Microsoft Teams**.
2824
+ 5. Set **Messaging endpoint** to the URL in
2825
+ [Messaging endpoint](#messaging-endpoint), or for a hosted deploy, the
2826
+ URL in [Deploy](#deploy).
2827
+
2828
+ ## Install the bot in Teams
2829
+
2830
+ Teams installs a bot from an app package: a zip of `manifest.json` and two
2831
+ icons. `agent-sdk channels teams package` builds it from the channel. The
2832
+ `bots` entry names the Azure Bot by its app ID and the places people can
2833
+ talk to it:
2834
+
2835
+ ```json
2836
+ {
2837
+ "id": "<TEAMS_APP_ID>",
2838
+ "bots": [
2839
+ {
2840
+ "botId": "<TEAMS_APP_ID>",
2841
+ "scopes": ["personal", "team", "groupChat"],
2842
+ "isNotificationOnly": false
2843
+ }
2844
+ ]
2845
+ }
2846
+ ```
2847
+
2848
+ A full manifest also needs `manifestVersion`, `version`, `developer`,
2849
+ `name`, `description`, `icons`, and `accentColor`; see the
2850
+ [app manifest schema](https://learn.microsoft.com/microsoftteams/platform/resources/schema/manifest-schema).
2851
+ Upload the package in Teams under **Apps** > **Manage your apps** >
2852
+ **Upload an app**, or have a Teams admin publish it to your organization
2853
+ in the Teams admin center. Then add the app to a team, a group chat, or a
2854
+ personal chat.
2855
+
2856
+ ## Wake on a channel post
2857
+
2858
+ Teams sends a channel post without a mention only to an app that holds
2859
+ the resource-specific consent permission `ChannelMessage.Read.Group`.
2860
+ `package` adds it when the channel sets `engagement.channelPosts`, and a
2861
+ team owner grants it when they add the app to the team:
2862
+
2863
+ ```json
2864
+ {
2865
+ "webApplicationInfo": { "id": "<TEAMS_APP_ID>" },
2866
+ "authorization": {
2867
+ "permissions": {
2868
+ "resourceSpecific": [{ "name": "ChannelMessage.Read.Group", "type": "Application" }]
2869
+ }
2870
+ }
2871
+ }
2872
+ ```
2873
+
2874
+ Then name the channels to watch. Copy a channel's ID from its **Get link
2875
+ to channel** URL: it's the `19:…@thread.tacv2` part.
2876
+
2877
+ ```ts
2878
+ export default teamsChannel({
2879
+ engagement: {
2880
+ channelPosts: {
2881
+ allow: ["19:4b7c2f9e1d6a4e8f9a3b5c7d1e2f3a4b@thread.tacv2"],
2882
+ posts: "all",
2883
+ },
2884
+ },
2885
+ });
2886
+ ```
2887
+
2888
+ Watched posts go to `onChannelPost` when you set it, the same way
2889
+ mentions go to `onAppMention` and personal chats to `onDirectMessage`.
2890
+ Return `null` from a hook to skip a message. `posts` is `"top-level"` (the
2891
+ default), `"replies"`, or `"all"`. Use
2892
+ `allow: ["*"]` to watch every channel the app is in, and
2893
+ `replies: "joined"` to also answer replies in any reply chain the agent
2894
+ already answered. Bot posts stay out unless you set `includeBotPosts: true`;
2895
+ the agent's own posts never start a turn.
2896
+
2897
+ To let another bot wake the agent with an @mention, list it in
2898
+ `engagement.botMentions.allowFrom` as `28:<its app ID>`. Each thread allows
2899
+ 5 bot wakes an hour and 20 in total by default
2900
+ (`maxPerThreadPerHour`, `maxPerThreadTotal`).
2901
+
2902
+ ## Stream the reply
2903
+
2904
+ ```ts
2905
+ export default teamsChannel({ reply: { mode: "stream" } });
2906
+ ```
2907
+
2908
+ In stream mode the agent posts one message as soon as it starts working.
2909
+ That message names the tool the agent is running until text arrives, then
2910
+ fills in as the reply grows, and it ends as the final answer. Teams limits
2911
+ how often a bot can edit a message, so the channel edits at most once
2912
+ every 1.5 seconds; set `updateIntervalMs` to change that.
2913
+
2914
+ ## Approve tool calls in Teams
2915
+
2916
+ ```ts
2917
+ export default teamsChannel({ toolApprovals: true });
2918
+ ```
2919
+
2920
+ When a server tool with `needsApproval` is about to run, the agent posts
2921
+ an Adaptive Card in the thread with the tool's arguments, secrets
2922
+ redacted, and **Approve** and **Deny** buttons. Anyone who could continue
2923
+ the conversation can decide; set `policy: { respondTo: "author" }` to
2924
+ limit that, and follow-ups, to the person who started it. After the click,
2925
+ the card shows the decision and who made it.
2926
+
2927
+ For your own cards, handle other `Action.Submit` clicks in
2928
+ `onCardAction`, which receives the submitted data and can start a turn in
2929
+ the card's thread.
2930
+
2931
+ ## Refuse guests and other tenants
2932
+
2933
+ By default the channel answers only members and owners of the bot's
2934
+ tenant. It asks Teams for the sender's role and tenant. It refuses a
2935
+ guest, an anonymous meeting user, or a person from another organization.
2936
+ This applies when they message the agent and when they click a card.
2937
+ **Approve** and **Deny** are card clicks. A sender with no role is
2938
+ refused. A sender Teams does not list is refused too.
2939
+
2940
+ The agent posts one short reply to a refused sender. It posts at most
2941
+ once per conversation and sender per hour. The default text is "I can
2942
+ only help members of this organization. Ask the agent owner to allow
2943
+ guests."
2944
+
2945
+ Set `policy.refusalMessage` to change the default text. Set
2946
+ `policy.refusalMessage` to `false` to stay silent. Silence applies to a
2947
+ refused sender and to a sender the lookup could not verify.
2948
+
2949
+ A failed lookup gets the reply "I couldn't verify your access, try again
2950
+ shortly." The agent does not reply to a card click from a refused sender.
2951
+ The agent ignores a card click from a bot, including a bot that
2952
+ `engagement.botMentions` allows. The agent does not reply to an activity
2953
+ from another tenant.
2954
+
2955
+ To let guests and external members in, set `blockExternals` to `false`.
2956
+
2957
+ ```ts
2958
+ export default teamsChannel({ policy: { blockExternals: false } });
2959
+ ```
2960
+
2961
+ ```ts
2962
+ export default teamsChannel({
2963
+ policy: {
2964
+ refusalMessage: "Ask your team owner to add you to this organization.",
2965
+ },
2966
+ });
2967
+ ```
2968
+
2969
+ ## Welcome message
2970
+
2971
+ When someone installs the app in a conversation, the agent posts one
2972
+ greeting there. Teams reports the install as an `installationUpdate`
2973
+ activity whose action is `add`. The greeting does not start a model turn.
2974
+ The agent posts it once per conversation.
2975
+
2976
+ The default text is "Hi! Mention me in a channel, or message me here, to
2977
+ get started."
2978
+
2979
+ Set `welcome` to change the greeting. Set `welcome` to `false` to turn
2980
+ it off.
2981
+
2982
+ ```ts
2983
+ export default teamsChannel({
2984
+ welcome: "Hi. Mention me when you want help with a laptop.",
2985
+ });
2986
+ ```
2987
+
2988
+ ## Messaging endpoint
2989
+
2990
+ Under `agent-sdk dev` or self-hosted `agent-sdk serve`, the Azure Bot's
2991
+ messaging endpoint is the server's public origin plus the channel's path:
2992
+
2993
+ ```text
2994
+ https://<origin>/<slug>/v1/channels/<channel>
2995
+ ```
2996
+
2997
+ `<slug>` is the agent's slug and `<channel>` is the channel file's name, so
2998
+ `bot/channels/teams.ts` in the `helm` agent answers at
2999
+ `https://<origin>/helm/v1/channels/teams`. The URL has no trailing slash.
3000
+ With `teamsChannel({ path: "/messages" })`, the channel appends that path:
3001
+ `https://<origin>/helm/v1/channels/teams/messages`. A hosted deploy has a
3002
+ different URL; see [Deploy](#deploy).
3003
+
3004
+ ## Test locally
3005
+
3006
+ Teams reaches the bot only at a public HTTPS URL. `agent-sdk dev` opens a
3007
+ `cloudflared` tunnel and prints the messaging endpoint on the tunnel's
3008
+ origin:
3009
+
3010
+ ```bash
3011
+ agent-sdk dev ./helm
3012
+ ```
3013
+
3014
+ Copy the printed URL into the Azure Bot's **Messaging endpoint**, then
3015
+ mention the bot in Teams. `--tunnel devtunnel` keeps one URL across
3016
+ restarts. Next to a plain `agent-sdk serve`, `agent-sdk channels teams
3017
+ forward` opens the same tunnel. `agent-sdk dev --mode single` serves one agent
3018
+ without a slug, so its endpoint is `https://<origin>/v1/channels/teams`.
3019
+ Without `--mode single`, the endpoint includes the agent's slug:
3020
+ `https://<origin>/helm/v1/channels/teams`.
3021
+
3022
+ To run your own tunnel instead, serve with plain `agent-sdk serve`, which
3023
+ opens no tunnel, and point `cloudflared` at its port:
3024
+
3025
+ ```bash
3026
+ agent-sdk serve --dir ./helm --mode single --port 3978
3027
+ cloudflared tunnel --url http://localhost:3978
3028
+ ```
3029
+
3030
+ Add `--protocol http2` to `cloudflared` if your network blocks QUIC. Set the
3031
+ Azure Bot's **Messaging endpoint** to the printed `<public-url>` plus
3032
+ `/v1/channels/teams`, or `<public-url>/helm/v1/channels/teams` without
3033
+ `--mode single`. The built-in tunnel forwards only `POST` requests to the
3034
+ Teams messaging paths. A tunnel you run yourself exposes every route on the
3035
+ port.
3036
+
3037
+ Requests through a tunnel always get the Bot Framework token check, so only
3038
+ Teams can start turns there. A tunnel adds proxy headers or forwards its
3039
+ public hostname, and the dev exception for unsigned activities refuses both.
3040
+ To replay a saved activity without Teams, POST it to the same path on
3041
+ `http://127.0.0.1:<port>` from the same machine; `agent-sdk dev` admits
3042
+ unsigned activities from loopback only.
3043
+
3044
+ ## Deploy
3045
+
3046
+ Hosted, the agent needs its three secrets:
3047
+
3048
+ ```ts
3049
+ // bot/agent.ts
3050
+ import { defineAgent } from "@grok/agent-sdk";
3051
+
3052
+ export default defineAgent({
3053
+ hosting: {
3054
+ secretNames: ["TEAMS_APP_ID", "TEAMS_APP_PASSWORD", "TEAMS_TENANT_ID"],
3055
+ },
3056
+ });
3057
+ ```
3058
+
3059
+ Hosting adds the Microsoft hosts that a Teams channel calls
3060
+ (`login.microsoftonline.com`, `login.botframework.com`, and
3061
+ `smba.trafficmanager.net`), so you do not list them in `egressDomains`.
3062
+ Your team's network settings still apply to them. If your team restricts
3063
+ egress, its allowlist must include all three hosts, or the agent's replies
3064
+ fail.
3065
+
3066
+ An `envPrefix` changes the secret names. With
3067
+ `teamsChannel({ envPrefix: "ECHO" })`, list `ECHO_TEAMS_APP_ID`,
3068
+ `ECHO_TEAMS_APP_PASSWORD`, and `ECHO_TEAMS_TENANT_ID` in `secretNames`, and
3069
+ set those names with `agent-sdk secret set`.
3070
+
3071
+ ```bash
3072
+ agent-sdk deploy --dir . --slug helpdesk
3073
+ agent-sdk secret set helpdesk TEAMS_APP_ID
3074
+ agent-sdk secret set helpdesk TEAMS_APP_PASSWORD
3075
+ agent-sdk secret set helpdesk TEAMS_TENANT_ID
3076
+ ```
3077
+
3078
+ `agent-sdk deploy` prints the hosted messaging endpoint on a `public:`
3079
+ line that ends in `/v1/channels/teams`. Set the Azure Bot's **Messaging
3080
+ endpoint** to that URL, not to the slug URL from local testing. With a
3081
+ custom `path`, add it after the printed URL.
3082
+
3083
+ On hosting, Cursor checks the Bot Framework token and the tenant before
3084
+ the agent starts. Activities that the channel cannot act on, such as a
3085
+ reaction or an unmentioned post outside `channelPosts`, stop there and
3086
+ use no compute. Each personal or group chat is one session, and each
3087
+ channel reply chain is one session. Tool approvals work on hosting: an
3088
+ Approve or Deny click reaches the turn that waits for it, and a call that
3089
+ nobody approves in 10 minutes is denied.
3090
+
3091
+ Hosting runs Teams channels only in the commercial Microsoft cloud, and
3092
+ only for teams that have Teams channels turned on. The deploy fails
3093
+ otherwise.
3094
+
3095
+ ## How Teams differs from Slack
3096
+
3097
+ | | Slack | Teams |
3098
+ | --- | --- | --- |
3099
+ | App | Your Slack app's bot and app tokens | Your Azure Bot's app ID, client secret, and tenant |
3100
+ | Local transport | Socket Mode, no public URL | `agent-sdk dev` opens a tunnel to the messaging endpoint |
3101
+ | Watch channel posts | `message.channels` subscription | `ChannelMessage.Read.Group` consent at install |
3102
+ | Threads | Every message can start a thread | Reply chains in channels; personal and group chats are one conversation each |
3103
+ | Bot-to-bot wakes | `maxDepth` from message metadata, plus per-thread caps | Per-thread caps only |
3104
+ | Progress | Status chip, streaming API, tool and reasoning cards | Typing indicator, or one edited message in stream mode |
3105
+ | Approvals | Block Kit buttons | Adaptive Card buttons |
3106
+ | Hosted sessions | One per thread | One per chat, or one per channel reply chain |
3107
+ | Not available in Teams | | Reactions, file uploads and downloads, suggested prompts, `eval` commands, edit debounce |
3108
+
3109
+ ## Related
3110
+
3111
+ - [Slack](/docs/guides/slack.md)
3112
+ - [Webhooks](/docs/guides/webhooks.md)
3113
+ - [Deployment](/docs/deployment.md)
3114
+ - [Channels reference](/docs/reference/channels.md)
3115
+
3116
+ ---
3117
+
2625
3118
  Source: /docs/guides/webhooks.md
2626
3119
 
2627
3120
  # Webhook agents
@@ -2853,6 +3346,238 @@ Keep sample payloads under `fixtures/` and pass them with
2853
3346
 
2854
3347
  ---
2855
3348
 
3349
+ Source: /docs/guides/workload-identity.md
3350
+
3351
+ # Authenticate deployed agents with OIDC
3352
+
3353
+ A deployed Agent SDK agent can mint short-lived OIDC JWTs signed by Cursor and exchange them for temporary cloud credentials or service tokens without storing static access keys in deployment secrets.
3354
+
3355
+ Agent SDK tokens share the `https://api.cursor.com` issuer, discovery endpoints, signing keys, 5-minute lifetime, socket path, and per-pod rate limits documented in [Cloud Agents OIDC tokens](https://cursor.com/docs/cloud-agent/identity). They differ in four ways:
3356
+
3357
+ | Aspect | Cloud Agents | Agent SDK deployments |
3358
+ | --- | --- | --- |
3359
+ | Audience allowlist | Any valid `aud` string | Must be declared in `hosting.oidc.audiences`; undeclared audiences return HTTP `400`. |
3360
+ | Subject (`sub`) | `cloud_agent_id:<id>` (or projected `team_id:<id>` via `sub_claim`) | Always `agent_sdk_deployment_id:<deployment-id>`. Sending `sub_claim` returns HTTP `400`. |
3361
+ | Runtime claim (`agent_runtime`) | `"managed"` or `"self_hosted"` | `"agent_sdk"`. |
3362
+ | Additional claims | Includes owner, team, repository, branch, and turn claims | See [Token claims](#token-claims). No owner, team, repository, or session claims. |
3363
+
3364
+ ## Declare allowed audiences
3365
+
3366
+ A deployed agent can only mint tokens for audiences declared in `hosting.oidc.audiences` in `bot/agent.ts`. If you omit `hosting.oidc.audiences`, every mint request fails with HTTP `400`.
3367
+
3368
+ ```ts
3369
+ // bot/agent.ts
3370
+ import { defineAgent } from "@grok/agent-sdk";
3371
+
3372
+ export default defineAgent({
3373
+ hosting: {
3374
+ egressDomains: ["sts.amazonaws.com"],
3375
+ oidc: {
3376
+ audiences: ["sts.amazonaws.com"],
3377
+ },
3378
+ },
3379
+ });
3380
+ ```
3381
+
3382
+ Minting talks to a local Unix socket, so minting itself needs no egress entry. Calling the relying party to exchange the token still requires its hostname in `hosting.egressDomains`, such as `sts.amazonaws.com` (and any AWS service host your agent calls afterward).
3383
+
3384
+ Audience rules:
3385
+
3386
+ - List exact audience strings only. Wildcards (`*`) are rejected.
3387
+ - Declare at most 8 audiences per deployment.
3388
+ - Each audience must be 1 to 512 printable ASCII characters with no spaces or control characters.
3389
+ - Cursor-reserved audiences (such as `cursor.com` hosts) are rejected at deploy time and at mint time.
3390
+ - Cursor saves `hosting.oidc.audiences` when you deploy. Redeploy to add or remove an audience.
3391
+
3392
+ ## Mint a token with `getOidcToken`
3393
+
3394
+ Import `getOidcToken` from `@grok/agent-sdk` and call it inside a tool, channel handler, or callback when your agent needs a token.
3395
+
3396
+ ```ts
3397
+ // bot/tools/assume_aws_role.ts
3398
+ import { getOidcToken, OidcTokenError } from "@grok/agent-sdk";
3399
+ import { defineTool } from "@grok/agent-sdk/tools";
3400
+ import { z } from "zod";
3401
+
3402
+ export default defineTool({
3403
+ description: "Exchange an OIDC token for temporary AWS credentials.",
3404
+ inputSchema: z.object({}),
3405
+ async execute() {
3406
+ let token: string;
3407
+ try {
3408
+ const result = await getOidcToken("sts.amazonaws.com");
3409
+ token = result.token;
3410
+ } catch (error) {
3411
+ if (error instanceof OidcTokenError) {
3412
+ return {
3413
+ ok: false,
3414
+ code: error.code,
3415
+ status: error.status ?? null,
3416
+ reason: error.reason ?? null,
3417
+ };
3418
+ }
3419
+ throw error;
3420
+ }
3421
+
3422
+ const body = new URLSearchParams({
3423
+ Action: "AssumeRoleWithWebIdentity",
3424
+ Version: "2011-06-15",
3425
+ RoleArn: "arn:aws:iam::123456789012:role/my-agent-role",
3426
+ RoleSessionName: "agent-sdk-session",
3427
+ WebIdentityToken: token,
3428
+ });
3429
+
3430
+ const response = await fetch("https://sts.amazonaws.com/", {
3431
+ method: "POST",
3432
+ headers: {
3433
+ "content-type": "application/x-www-form-urlencoded",
3434
+ accept: "application/json",
3435
+ },
3436
+ body,
3437
+ });
3438
+
3439
+ if (!response.ok) {
3440
+ return { ok: false, stsStatus: response.status };
3441
+ }
3442
+ return { ok: true };
3443
+ },
3444
+ });
3445
+ ```
3446
+
3447
+ Call `getOidcToken` inside a tool, handler, or callback, not at module load time.
3448
+
3449
+ ### Return value and caching
3450
+
3451
+ `getOidcToken(audience: string)` returns `Promise<OidcToken>`:
3452
+
3453
+ | Field | Type | Meaning |
3454
+ | --- | --- | --- |
3455
+ | `token` | `string` | Compact RS256-signed JWT. Never log it. |
3456
+ | `expiresAt` | `Date` | Token expiration timestamp from the socket's `expires_at` field. |
3457
+
3458
+ `getOidcToken` caches one token per audience in memory and refreshes it 60 seconds before `expiresAt`. Concurrent callers for the same audience share a single in-flight mint request. Each mint request times out after 20 seconds.
3459
+
3460
+ ### Error handling
3461
+
3462
+ `getOidcToken` throws `OidcTokenError` (a subclass of `Error` with `name === "OidcTokenError"`) on failure:
3463
+
3464
+ | Field | Type | Meaning |
3465
+ | --- | --- | --- |
3466
+ | `code` | `OidcTokenErrorCode` | Failure category listed below. |
3467
+ | `status` | `number \| undefined` | HTTP status code from the identity socket when an HTTP response was received. |
3468
+ | `reason` | `string \| undefined` | Machine-readable `error` string from the socket's JSON error body, when present. |
3469
+
3470
+ `OidcTokenErrorCode` values:
3471
+
3472
+ | `code` | Typical `status` | Cause | What to do |
3473
+ | --- | --- | --- | --- |
3474
+ | `"not_hosted"` | `undefined` | No identity socket exists (for example, during local `agent-sdk dev` or `agent-sdk serve`). | Use local credentials in development or skip OIDC locally. |
3475
+ | `"refused"` | `403` | The deployment is not running (stopped or deleted) or OIDC minting is disabled for this deployment. | Treat as non-retryable. Check deployment status. |
3476
+ | `"rate_limited"` | `429` | The per-pod mint rate limit was exceeded. | Back off and retry. Prefer `getOidcToken` caching over repeated raw calls. |
3477
+ | `"timeout"` | `undefined` | The mint request did not finish within 20 seconds. | Retry with backoff. |
3478
+ | `"malformed"` | `undefined` | The socket returned HTTP `200` with invalid JSON, missing `token` or `expires_at`, or a body larger than 64 KiB. | Retry or inspect runtime logs. |
3479
+ | `"failed"` | `400`, `5xx`, or `undefined` | Another HTTP error or socket transport failure. | Check `status`. HTTP `400` means fix the request or declare the audience in `hosting.oidc.audiences`; `5xx` errors are retryable. |
3480
+
3481
+ When you request an audience that is not listed in `hosting.oidc.audiences`, the socket returns HTTP `400` and `getOidcToken` throws `OidcTokenError` with `code: "failed"` and `status: 400`. Branch on `code` and `status` rather than matching `reason`, which can change.
3482
+
3483
+ ## Call the identity socket directly
3484
+
3485
+ Use the local Unix domain socket directly from shell scripts, non-JavaScript tools, or when you need a `nonce` claim (which `getOidcToken` does not accept).
3486
+
3487
+ The socket path is in `$CURSOR_AGENT_SOCKET`, defaulting to `/run/cursor/api.sock`. Send `POST /v1/tokens/oidc` with `Content-Type: application/json` (maximum body size 4 KB):
3488
+
3489
+ ```bash
3490
+ curl --silent --show-error --fail-with-body \
3491
+ --unix-socket "${CURSOR_AGENT_SOCKET:-/run/cursor/api.sock}" \
3492
+ -H 'Content-Type: application/json' \
3493
+ -d '{"aud":"sts.amazonaws.com"}' \
3494
+ http://localhost/v1/tokens/oidc
3495
+ ```
3496
+
3497
+ Request fields:
3498
+
3499
+ - `aud` (required string): exact audience declared in `hosting.oidc.audiences`.
3500
+ - `nonce` (optional string): opaque printable ASCII string with no spaces, up to 512 characters, echoed into the JWT `nonce` claim.
3501
+
3502
+ Success response (`200 OK`):
3503
+
3504
+ ```json
3505
+ {
3506
+ "token": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ii4uLiIsInR5cCI6IkpXVCJ9...",
3507
+ "expires_at": 1785500000
3508
+ }
3509
+ ```
3510
+
3511
+ `expires_at` is the token expiration in Unix seconds and matches the JWT `exp` claim.
3512
+
3513
+ An undeclared audience, a Cursor-reserved audience, an invalid `aud`, or a `sub_claim` field returns HTTP `400` with a JSON error object whose `error` string can change.
3514
+
3515
+ See [Cloud Agents OIDC tokens](https://cursor.com/docs/cloud-agent/identity) for the full socket HTTP status code table and per-pod rate limits.
3516
+
3517
+ ## Token claims
3518
+
3519
+ Tokens are signed with `RS256` and include `alg`, `kid`, and `typ: "JWT"` in the header. Every Agent SDK token carries these claims:
3520
+
3521
+ | Claim | Value | Notes |
3522
+ | --- | --- | --- |
3523
+ | `iss` | `https://api.cursor.com` | Same issuer as Cloud Agents. |
3524
+ | `sub` | `agent_sdk_deployment_id:<deployment-id>` | `<deployment-id>` is the deployment public ID (`asd_` followed by 32 lowercase hex characters). |
3525
+ | `aud` | Requested audience string | Always a single string matching an entry in `hosting.oidc.audiences`. |
3526
+ | `iat` | Unix seconds | Issued-at time. |
3527
+ | `nbf` | `iat - 5` | Allows 5 seconds of clock skew. |
3528
+ | `exp` | `iat + 300` | Valid for 5 minutes. |
3529
+ | `jti` | UUID | Unique token ID per mint. |
3530
+ | `agent_runtime` | `"agent_sdk"` | Identifies an Agent SDK deployment token. |
3531
+ | `nonce` | Optional string | Present only when sent on a raw socket request. |
3532
+
3533
+ ## Configure an AWS IAM trust policy
3534
+
3535
+ 1. In AWS IAM, add `https://api.cursor.com` as an OpenID Connect identity provider with `sts.amazonaws.com` as an audience (if your AWS account does not already have one).
3536
+ 2. Declare `"sts.amazonaws.com"` in `hosting.oidc.audiences` and `hosting.egressDomains`, then deploy your agent.
3537
+ 3. Find your deployment's exact `sub` claim (`agent_sdk_deployment_id:asd_<32 hex chars>`). You can read `sub` from the JWT payload of a minted token during initial setup. Redeploying the same slug keeps the same deployment public ID; deleting and recreating a deployment generates a new one.
3538
+ 4. Attach a trust policy to your IAM role that pins both `api.cursor.com:aud` and `api.cursor.com:sub` with `StringEquals`:
3539
+
3540
+ ```json
3541
+ {
3542
+ "Version": "2012-10-17",
3543
+ "Statement": [
3544
+ {
3545
+ "Effect": "Allow",
3546
+ "Principal": {
3547
+ "Federated": "arn:aws:iam::123456789012:oidc-provider/api.cursor.com"
3548
+ },
3549
+ "Action": "sts:AssumeRoleWithWebIdentity",
3550
+ "Condition": {
3551
+ "StringEquals": {
3552
+ "api.cursor.com:aud": "sts.amazonaws.com",
3553
+ "api.cursor.com:sub": "agent_sdk_deployment_id:asd_3f9c0a7b1d2e4f60a9b8c7d6e5f40312"
3554
+ }
3555
+ }
3556
+ }
3557
+ ]
3558
+ }
3559
+ ```
3560
+
3561
+ Never replace the `sub` value with a wildcard such as `agent_sdk_deployment_id:*`. A wildcard trusts every Agent SDK deployment on Cursor.
3562
+
3563
+ ## Verification, rate limits, and trust model
3564
+
3565
+ For OIDC discovery (`https://api.cursor.com/.well-known/openid-configuration`), JWKS (`https://api.cursor.com/keys`), JWT signature verification steps, and per-pod rate limits, see [Cloud Agents OIDC tokens](https://cursor.com/docs/cloud-agent/identity).
3566
+
3567
+ Keep the deployment trust boundary in mind when scoping external roles:
3568
+
3569
+ - Any code or tool running inside the deployment pod that can reach the identity socket can mint tokens for any audience declared in `hosting.oidc.audiences`.
3570
+ - The platform sets `sub` from the deployment identity, so one deployment cannot impersonate another.
3571
+ - Tokens represent the deployment as a whole, not a single session, tool, or end user. Grant the external role only the permissions that the deployment should hold.
3572
+
3573
+ ## Related
3574
+
3575
+ - [Deployment](/docs/deployment.md)
3576
+ - [Agent config](/docs/reference/agent-config.md)
3577
+ - [Cloud Agents OIDC tokens](https://cursor.com/docs/cloud-agent/identity)
3578
+
3579
+ ---
3580
+
2856
3581
  Source: /docs/hillclimbing.md
2857
3582
 
2858
3583
  # Hillclimbing
@@ -3285,7 +4010,7 @@ export default defineAgent({
3285
4010
  | `description` | string | What the agent is for. Required on subagents, where the parent model reads it to decide when to delegate. |
3286
4011
  | `instructions` | string | Inline instructions for subagents and generated configs. Prefer `instructions.md`. |
3287
4012
  | `local` | `{ cwd?, workspaceDir?, sandbox? }` | Defaults for a local run. See [Local options](#local-options). |
3288
- | `hosting` | `{ egressDomains?, secretNames? }` | The egress allowlist and expected secret names that `agent-sdk deploy` reads. Mounted [extensions](/docs/reference/extensions.md#build-an-extension) add their own. |
4013
+ | `hosting` | `{ egressDomains?, secretNames?, oidc? }` | The egress allowlist, expected secret names, and [OIDC token audiences](/docs/guides/workload-identity.md) that `agent-sdk deploy` reads. Mounted [extensions](/docs/reference/extensions.md#build-an-extension) add their own egress hosts and secrets. |
3289
4014
  | `concurrency` | `{ maxRunningTurns? }` | Agent-wide limit on concurrent turns. See [Concurrency](#concurrency). |
3290
4015
  | `builtinTools` | `{ reminders? }` | Opt-in tools that Agent SDK provides. See [Built-in tools](#built-in-tools). |
3291
4016
  | `tools` | `ToolName[]` | Allowlist of built-in tools. Omit it for the full standard toolset. See [Harness tools](#harness-tools). |
@@ -3764,6 +4489,7 @@ Import each one from `@grok/agent-sdk/channels/<name>`.
3764
4489
  | Function | Details |
3765
4490
  | --- | --- |
3766
4491
  | `slackChannel()` | [Slack](/docs/guides/slack.md) |
4492
+ | `teamsChannel()` | [Microsoft Teams](/docs/guides/teams.md) |
3767
4493
  | `githubChannel()` | [GitHub](/docs/guides/github.md) |
3768
4494
  | `gitlabChannel()` | [GitLab](/docs/guides/gitlab.md) |
3769
4495
  | `bitbucketChannel()` | [Bitbucket](/docs/guides/bitbucket.md) |
@@ -3874,6 +4600,7 @@ command remains available.
3874
4600
  | [`mcp serve`, `mcp install`](#mcp) | Connect an MCP client to an agent |
3875
4601
  | [`mcp oauth`](#mcp-oauth) | Authorize an MCP connection |
3876
4602
  | [`slack`](#slack) | Provision and check Slack channel apps |
4603
+ | [`teams`](#teams) | Connect, check, and package a Microsoft Teams bot |
3877
4604
  | [`github`](#github) | Forward, replay, and inspect GitHub webhooks |
3878
4605
  | [`gitlab`, `bitbucket`, `pagerduty`](#replay-other-webhooks) | Replay and inspect GitLab, Bitbucket, or PagerDuty webhooks |
3879
4606
 
@@ -3939,6 +4666,12 @@ agent-sdk dev ./agent-sdk-pr-reviewer --port 3000
3939
4666
  It accepts every `serve` option. Don't combine the path with a different
3940
4667
  `--dir`.
3941
4668
 
4669
+ When an agent has a Microsoft Teams channel, `dev` also opens a cloudflared
4670
+ quick tunnel and prints that channel's messaging endpoint. Pass
4671
+ `--tunnel devtunnel` for an endpoint that stays the same across restarts, and
4672
+ `--tunnel-id <id>` to pick the dev tunnel. See
4673
+ [Configure Microsoft Teams](#teams).
4674
+
3942
4675
  ### Serve the docs {#docs}
3943
4676
 
3944
4677
  ```text
@@ -4343,6 +5076,115 @@ token prefix defaults to the project directory name in upper snake case.
4343
5076
  `--channel-posts` adds the message events that `engagement.channelPosts`
4344
5077
  needs. See [Slack](/docs/guides/slack.md) for manual setup.
4345
5078
 
5079
+ ### Configure Microsoft Teams {#teams}
5080
+
5081
+ ```text
5082
+ agent-sdk channels teams setup
5083
+ agent-sdk channels teams init --app-id <guid> --tenant-id <guid> [--dir <path>]
5084
+ [--prefix <prefix>] [--dry-run] [--json]
5085
+ agent-sdk channels teams doctor [--dir <path>] [--slug <slug>] [--channel <id>]
5086
+ [--endpoint <url>] [--json]
5087
+ agent-sdk channels teams package [--dir <path>] [--slug <slug>] [--channel <id>]
5088
+ [--name <name>] [--icon <png>] [--app-version <x.y.z>] [--endpoint <url>]
5089
+ [--out <file>] [--dry-run] [--json]
5090
+ agent-sdk channels teams forward [--dir <path>] [--slug <slug>] [--channel <id>]
5091
+ [--host <host>] [--port <n>] [--tunnel cloudflared|devtunnel]
5092
+ [--tunnel-id <id>] [--json]
5093
+ ```
5094
+
5095
+ | Subcommand | Contract |
5096
+ | --- | --- |
5097
+ | `setup` | Print the Azure Bot setup steps without changing files. |
5098
+ | `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. |
5099
+ | `doctor` | Run the checks below and exit `1` when one fails. A check it can't run is skipped and says why. |
5100
+ | `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**. |
5101
+ | `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. |
5102
+
5103
+ `agent-sdk dev` opens the same tunnel by itself. The endpoint is the tunnel
5104
+ origin plus `/<slug>/v1/channels/<channel>`, such as
5105
+ `https://<random>.trycloudflare.com/helm/v1/channels/teams`. Set it as the
5106
+ Azure Bot's messaging endpoint. The tunnel forwards only `POST` requests to
5107
+ the Teams messaging paths, so the rest of the agent's API stays local. Every
5108
+ other request on the tunnel host gets a `404`.
5109
+
5110
+ `--tunnel` picks the tunnel for `dev` and `channels teams forward`:
5111
+
5112
+ | `--tunnel` | Needs | Endpoint |
5113
+ | --- | --- | --- |
5114
+ | `cloudflared` (default) | `cloudflared` on `PATH`. No account. | A new `trycloudflare.com` URL on every start. Set it on the bot again after each restart. |
5115
+ | `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. |
5116
+
5117
+ With `devtunnel`, the first start creates a dev tunnel that allows anonymous
5118
+ access, adds port `3978`, and saves the tunnel id as `TEAMS_DEVTUNNEL_ID` in
5119
+ `.env.local`. Later starts reuse that tunnel. `--tunnel-id <id>` picks the id.
5120
+ Microsoft deletes a dev tunnel after 30 days without use, and the next start
5121
+ creates it again under the same id. Port `3978` belongs to the tunnel, so
5122
+ `--port 3978` with `--tunnel devtunnel` stops with a usage error. Run the agent
5123
+ on another port. `devtunnel host` publishes every port on the tunnel, so the
5124
+ tunnel stops when it reports a port other than `3978`. Remove that port with
5125
+ `devtunnel port delete <id> -p <port>`, or pass another `--tunnel-id`.
5126
+
5127
+ The package manifest uses Teams manifest version 1.25. It names the bot by
5128
+ its app id and lists the scopes the channel answers in: mentions add `team`
5129
+ and `groupChat`, and personal chats add `personal`. With
5130
+ `engagement.channelPosts`, it also asks for `ChannelMessage.Read.Group`
5131
+ consent. `--endpoint` adds the messaging endpoint's host to `validDomains`.
5132
+ `--app-version` sets the app version. It defaults to `1.<YYYYMMDD>.<second of
5133
+ the day>` in UTC, so each new zip is higher than the last, and Teams and the
5134
+ Teams admin center accept it as an update. Teams refuses an update whose
5135
+ version is not higher than the installed one. After you set
5136
+ `--app-version 2.0.0`, a later default `1.x` version is lower, so keep passing
5137
+ a higher `--app-version`. The default's middle part has 8 digits, which is fine
5138
+ for a bot-only app. An app that adds an Office Add-in limits each part to 5
5139
+ digits.
5140
+
5141
+ `doctor` runs these checks in order:
5142
+
5143
+ | Check | Passes when |
5144
+ | --- | --- |
5145
+ | `env` | The app id, password, and tenant id variables are set. |
5146
+ | `token` | Microsoft Entra issues a Bot Framework token for the app within 10 seconds. |
5147
+ | `bot-tenant` | The Azure Bot is **Single Tenant** and its tenant is the one in the channel's tenant id variable. |
5148
+ | `bot-endpoint` | The Azure Bot's messaging endpoint is `--endpoint`. Without `--endpoint`, it reports the bot's endpoint. |
5149
+ | `teams-channel` | The Azure Bot's Microsoft Teams channel is added and on. |
5150
+ | `endpoint` | The endpoint's path names this channel, and an unsigned `POST` to it gets `401`. |
5151
+
5152
+ The three Azure checks need the Azure CLI, logged in with `az login`, on any
5153
+ operating system. Without it they are skipped. When no Azure Bot in the
5154
+ current subscription has the app id, they fail. Each `az` call has a time
5155
+ limit. The endpoint's path must end in `/v1/channels/<channel>` plus the
5156
+ channel's `path`, after nothing, the agent's slug, or `/engine` on
5157
+ Cursor-managed hosting. A URL for another channel or agent fails without a
5158
+ probe. The `endpoint` answers mean:
5159
+
5160
+ | Answer | Meaning |
5161
+ | --- | --- |
5162
+ | `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. |
5163
+ | `401` with `Unauthorized` | Cursor-managed hosting serves this URL and refuses the unsigned probe before the agent. |
5164
+ | `503` with `teams_not_configured` | The server has no app id or password for this channel. Check `envPrefix` and the secrets. |
5165
+ | `404` | No Teams channel at this path. Check the slug, the channel name, and the route path. |
5166
+ | A redirect | A dev tunnel that needs sign-in. Run `devtunnel access create <id> --anonymous`. |
5167
+
5168
+ `--endpoint` must be the public `https` URL that `dev` or `channels teams forward`
5169
+ prints. `agent-sdk dev` admits unsigned requests from loopback, so a loopback
5170
+ probe proves nothing. Without `--endpoint`, `doctor` probes the Azure Bot's
5171
+ messaging endpoint.
5172
+
5173
+ The channel's `envPrefix` owns the variable names. A new channel file reads
5174
+ `TEAMS_APP_ID`, `TEAMS_APP_PASSWORD`, and `TEAMS_TENANT_ID`. `init --prefix
5175
+ HELM` writes `envPrefix: "HELM"` into the new file and the names
5176
+ `HELM_TEAMS_APP_ID`, `HELM_TEAMS_APP_PASSWORD`, and `HELM_TEAMS_TENANT_ID`. The
5177
+ prefix must start with a letter, and each name must be a valid deployment
5178
+ secret name. When the agent already has a Teams channel, under any file name,
5179
+ `init` keeps it and writes the names it reads; a `--prefix` that disagrees with
5180
+ it stops with an error. `doctor` and `package` read the names from the loaded
5181
+ channel. Multi-agent servers need one Azure Bot per agent.
5182
+
5183
+ A channel that sets `credentials` in code has no env names for the CLI to
5184
+ read. `doctor` then skips the `env`, `token`, and Azure checks and says why,
5185
+ `package` and `init` stop with an error, and `doctor` still probes
5186
+ `--endpoint`.
5187
+
4346
5188
  ### Test GitHub webhooks {#github}
4347
5189
 
4348
5190
  ```text
@@ -5488,12 +6330,12 @@ Source: /docs/reference/limits.md
5488
6330
 
5489
6331
  # Limits
5490
6332
 
5491
- Cursor caps deployments for some teams. If your team has caps, these are the default values.
6333
+ Cursor caps deployments for every team. These are the default values.
5492
6334
 
5493
6335
  | Limit | Default | What counts |
5494
6336
  | --- | --- | --- |
5495
- | `owner.deployments` | 20 | Each slug, running or stopped |
5496
- | `owner.deploysPerDay` | 100 per 24 hours | Each accepted deploy, including redeploys |
6337
+ | `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. |
6338
+ | `owner.deploysPerDay` | 100 | Each accepted deploy in a rolling 24-hour window, including a redeploy. |
5497
6339
 
5498
6340
  The error looks like this:
5499
6341
 
@@ -5504,7 +6346,7 @@ The error looks like this:
5504
6346
  "limit": "owner.deployments",
5505
6347
  "max": 20,
5506
6348
  "current": 20,
5507
- "docsUrl": "https://cursor.com/docs/bdk/reference/limits"
6349
+ "docsUrl": "https://cursor.com/docs/agent-sdk/reference/limits"
5508
6350
  }
5509
6351
  ```
5510
6352
 
@@ -5963,6 +6805,18 @@ const events: ChannelEventHandlers = {
5963
6805
  In a local Slack session, a `nudge.delivered` event with no `deliveryId`
5964
6806
  came from a new Slack message, not from a `send()` call.
5965
6807
 
6808
+ ### Steer the agent's own running turn
6809
+
6810
+ A tool or a channel `events` handler can add a message to the turn it runs in
6811
+ with `ctx.steer(message, { deliveryId })`. The message lands through the
6812
+ Cursor SDK's `Run.steer` and is recorded like a steered `send()`, with
6813
+ `message.received` and `nudge.delivered`. It never starts a turn, opens a
6814
+ session, or queues the message. It
6815
+ resolves to `{ status: "steered", turnId, deliveryId }`, to `{ status: "no_turn" }`
6816
+ when the context's turn is no longer running, or to
6817
+ `{ status: "not_delivered", reason }` when the running turn didn't take the
6818
+ message.
6819
+
5966
6820
  ## Stream events
5967
6821
 
5968
6822
  Each NDJSON line is a `{ type, index, sessionId, turnId?, at, data }`
@@ -5975,6 +6829,7 @@ ISO-8601 timestamp.
5975
6829
  | 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
6830
  | 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
6831
  | Steps | `step.started`, `step.completed` | Model step boundaries and duration |
6832
+ | 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
6833
  | Reasoning | `reasoning.appended`, `reasoning.completed` | Streamed reasoning blocks |
5979
6834
  | Reply | `message.appended`, `message.completed` | Text deltas and finished assistant messages |
5980
6835
  | 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 +7478,7 @@ Start with three checks:
6623
7478
  | The deployment never reaches `running` | Run `agent-sdk deployment get <slug>`, and fix the error it reports. |
6624
7479
  | 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
7480
  | A hosted schedule doesn't fire | Check that the deployment is running and that the schedule is in `bot/schedules/` on the deployed ref. |
7481
+ | 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
7482
  | A custom route returns `429` | Wait for the time in `Retry-After`, then send it again. |
6627
7483
 
6628
7484
  ## GitHub deliveries fail
@@ -6642,6 +7498,26 @@ Start with three checks:
6642
7498
  | `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
7499
  | The bot ignores ordinary channel posts | Configure `engagement.channelPosts`, create the app with `--channel-posts`, and invite it to each allowed channel. |
6644
7500
 
7501
+ ## Teams does not respond
7502
+
7503
+ | What you see | What to do |
7504
+ | --- | --- |
7505
+ | `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. |
7506
+ | `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. |
7507
+ | `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. |
7508
+ | `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. |
7509
+ | `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`. |
7510
+ | `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`. |
7511
+ | `channels teams doctor` fails the `bot-endpoint` check | Set the endpoint that `dev` printed on the Azure Bot: **Configuration**, **Messaging endpoint**, **Apply**. |
7512
+ | `channels teams doctor` fails the `teams-channel` check | On the Azure Bot, open **Channels**, select **Microsoft Teams**, then select **Apply**. |
7513
+ | `agent-sdk dev` prints `warning: Teams tunnel: cloudflared is not installed` | Install `cloudflared`, put it on `PATH`, and restart `dev`. |
7514
+ | `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`. |
7515
+ | `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`. |
7516
+ | 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. |
7517
+ | 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**. |
7518
+
7519
+ See [Configure Microsoft Teams](/docs/reference/cli.md#teams) for the commands.
7520
+
6645
7521
  ## MCP authorization fails
6646
7522
 
6647
7523
  | What you see | What to do |