@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
@@ -0,0 +1,389 @@
1
+ ---
2
+ title: "Microsoft Teams"
3
+ description: "Answer mentions, personal chats, and watched channel posts in Microsoft Teams with your own Azure Bot."
4
+ ---
5
+
6
+ # Microsoft Teams agents
7
+
8
+ A Teams agent wakes when someone @mentions it in a channel or group chat,
9
+ messages it in a personal chat, or posts in a channel it watches. It
10
+ answers in the same reply chain. `teamsChannel()` takes the same engagement options as
11
+ `slackChannel()`, so an agent that already runs in Slack can run in Teams
12
+ with the same shape of config.
13
+
14
+ The agent answers as an Azure Bot that you register and own. Teams sends
15
+ each message to the bot's messaging endpoint, and the channel checks the
16
+ Bot Framework token on every request before it starts a turn.
17
+
18
+ ## Set up with the CLI
19
+
20
+ The `agent-sdk channels teams` commands do every step except the clicks in
21
+ the Azure portal and in Teams:
22
+
23
+ ```bash
24
+ agent-sdk channels teams setup
25
+ printf %s "$CLIENT_SECRET" | agent-sdk channels teams init --dir ./helm \
26
+ --app-id <microsoft-app-id> --tenant-id <app-tenant-id>
27
+ agent-sdk channels teams package --dir ./helm
28
+ agent-sdk dev ./helm
29
+ agent-sdk channels teams doctor --dir ./helm --endpoint <printed URL>
30
+ ```
31
+
32
+ 1. `setup` prints the Azure portal steps in
33
+ [Register the Azure Bot](#register-the-azure-bot).
34
+ 2. `init` writes `bot/channels/teams.ts` and puts the app id, the client
35
+ secret, and the tenant id in `.env.local`. It reads the secret from a
36
+ hidden prompt or stdin, never from an argument.
37
+ 3. `package` writes `helm-teams-app.zip`. Upload it in Teams, as
38
+ [Install the bot in Teams](#install-the-bot-in-teams) describes.
39
+ 4. `dev` opens a tunnel and prints the messaging endpoint. Set it on the
40
+ Azure Bot.
41
+ 5. `doctor` checks the env names, the token, the Azure Bot, and the
42
+ endpoint, and names the part that fails.
43
+
44
+ The [CLI reference](../reference/cli.md#teams) lists every flag. The rest of
45
+ this guide explains what the commands write and how the channel behaves.
46
+
47
+ ## Answer a mention or personal chat
48
+
49
+ ```ts
50
+ // bot/channels/teams.ts
51
+ import { teamsChannel } from "@grok/agent-sdk/channels/teams";
52
+
53
+ export default teamsChannel();
54
+ ```
55
+
56
+ By default the agent answers @mentions in channels and group chats, and
57
+ every message in a personal chat. While a turn runs, Teams shows the
58
+ typing indicator, and the reply arrives as one message in the reply chain.
59
+ In a channel, each reply chain is its own conversation. A personal chat
60
+ and a group chat have no reply chains, so each one is a single
61
+ conversation.
62
+
63
+ The channel reads three variables:
64
+
65
+ | Variable | Value |
66
+ | --- | --- |
67
+ | `TEAMS_APP_ID` | The Azure Bot's Microsoft App ID |
68
+ | `TEAMS_APP_PASSWORD` | A client secret of that app registration |
69
+ | `TEAMS_TENANT_ID` | Required. The home tenant of your single-tenant Azure Bot |
70
+
71
+ The Azure Bot is a single-tenant bot in your own tenant, because Azure
72
+ does not create new multi-tenant bots after July 31, 2025. The channel
73
+ mints its Bot Connector token in that tenant and ignores activities from
74
+ any other tenant. To run several
75
+ agents in one `agent-sdk dev`, give each its own bot and an `envPrefix`.
76
+ `channels teams init --prefix HELPDESK` writes it for you. The prefix
77
+ starts with a letter.
78
+
79
+ ```ts
80
+ export default teamsChannel({ envPrefix: "HELPDESK" });
81
+ // HELPDESK_TEAMS_APP_ID, HELPDESK_TEAMS_APP_PASSWORD, HELPDESK_TEAMS_TENANT_ID
82
+ ```
83
+
84
+ The channel file owns these names. When the file exists, `init` writes the
85
+ names it reads, and `doctor` and `package` read them from the loaded
86
+ channel.
87
+
88
+ ## Register the Azure Bot
89
+
90
+ 1. In the Azure portal, create an **Azure Bot** resource. Set **Type of
91
+ App** to **Single Tenant** and **Creation type** to **Create new
92
+ Microsoft App ID**.
93
+ 2. Open the bot's **Configuration** page. Copy **Microsoft App ID** and
94
+ **App Tenant ID**. `init` takes them as `--app-id` and `--tenant-id`.
95
+ 3. From **Configuration**, open **Manage Password**, add a client secret,
96
+ and copy its value. Azure shows the value once. `init` reads it from
97
+ the hidden prompt or stdin.
98
+ 4. Under **Channels**, add **Microsoft Teams**.
99
+ 5. Set **Messaging endpoint** to the URL in
100
+ [Messaging endpoint](#messaging-endpoint), or for a hosted deploy, the
101
+ URL in [Deploy](#deploy).
102
+
103
+ ## Install the bot in Teams
104
+
105
+ Teams installs a bot from an app package: a zip of `manifest.json` and two
106
+ icons. `agent-sdk channels teams package` builds it from the channel. The
107
+ `bots` entry names the Azure Bot by its app ID and the places people can
108
+ talk to it:
109
+
110
+ ```json
111
+ {
112
+ "id": "<TEAMS_APP_ID>",
113
+ "bots": [
114
+ {
115
+ "botId": "<TEAMS_APP_ID>",
116
+ "scopes": ["personal", "team", "groupChat"],
117
+ "isNotificationOnly": false
118
+ }
119
+ ]
120
+ }
121
+ ```
122
+
123
+ A full manifest also needs `manifestVersion`, `version`, `developer`,
124
+ `name`, `description`, `icons`, and `accentColor`; see the
125
+ [app manifest schema](https://learn.microsoft.com/microsoftteams/platform/resources/schema/manifest-schema).
126
+ Upload the package in Teams under **Apps** > **Manage your apps** >
127
+ **Upload an app**, or have a Teams admin publish it to your organization
128
+ in the Teams admin center. Then add the app to a team, a group chat, or a
129
+ personal chat.
130
+
131
+ ## Wake on a channel post
132
+
133
+ Teams sends a channel post without a mention only to an app that holds
134
+ the resource-specific consent permission `ChannelMessage.Read.Group`.
135
+ `package` adds it when the channel sets `engagement.channelPosts`, and a
136
+ team owner grants it when they add the app to the team:
137
+
138
+ ```json
139
+ {
140
+ "webApplicationInfo": { "id": "<TEAMS_APP_ID>" },
141
+ "authorization": {
142
+ "permissions": {
143
+ "resourceSpecific": [{ "name": "ChannelMessage.Read.Group", "type": "Application" }]
144
+ }
145
+ }
146
+ }
147
+ ```
148
+
149
+ Then name the channels to watch. Copy a channel's ID from its **Get link
150
+ to channel** URL: it's the `19:…@thread.tacv2` part.
151
+
152
+ ```ts
153
+ export default teamsChannel({
154
+ engagement: {
155
+ channelPosts: {
156
+ allow: ["19:4b7c2f9e1d6a4e8f9a3b5c7d1e2f3a4b@thread.tacv2"],
157
+ posts: "all",
158
+ },
159
+ },
160
+ });
161
+ ```
162
+
163
+ Watched posts go to `onChannelPost` when you set it, the same way
164
+ mentions go to `onAppMention` and personal chats to `onDirectMessage`.
165
+ Return `null` from a hook to skip a message. `posts` is `"top-level"` (the
166
+ default), `"replies"`, or `"all"`. Use
167
+ `allow: ["*"]` to watch every channel the app is in, and
168
+ `replies: "joined"` to also answer replies in any reply chain the agent
169
+ already answered. Bot posts stay out unless you set `includeBotPosts: true`;
170
+ the agent's own posts never start a turn.
171
+
172
+ To let another bot wake the agent with an @mention, list it in
173
+ `engagement.botMentions.allowFrom` as `28:<its app ID>`. Each thread allows
174
+ 5 bot wakes an hour and 20 in total by default
175
+ (`maxPerThreadPerHour`, `maxPerThreadTotal`).
176
+
177
+ ## Stream the reply
178
+
179
+ ```ts
180
+ export default teamsChannel({ reply: { mode: "stream" } });
181
+ ```
182
+
183
+ In stream mode the agent posts one message as soon as it starts working.
184
+ That message names the tool the agent is running until text arrives, then
185
+ fills in as the reply grows, and it ends as the final answer. Teams limits
186
+ how often a bot can edit a message, so the channel edits at most once
187
+ every 1.5 seconds; set `updateIntervalMs` to change that.
188
+
189
+ ## Approve tool calls in Teams
190
+
191
+ ```ts
192
+ export default teamsChannel({ toolApprovals: true });
193
+ ```
194
+
195
+ When a server tool with `needsApproval` is about to run, the agent posts
196
+ an Adaptive Card in the thread with the tool's arguments, secrets
197
+ redacted, and **Approve** and **Deny** buttons. Anyone who could continue
198
+ the conversation can decide; set `policy: { respondTo: "author" }` to
199
+ limit that, and follow-ups, to the person who started it. After the click,
200
+ the card shows the decision and who made it.
201
+
202
+ For your own cards, handle other `Action.Submit` clicks in
203
+ `onCardAction`, which receives the submitted data and can start a turn in
204
+ the card's thread.
205
+
206
+ ## Refuse guests and other tenants
207
+
208
+ By default the channel answers only members and owners of the bot's
209
+ tenant. It asks Teams for the sender's role and tenant. It refuses a
210
+ guest, an anonymous meeting user, or a person from another organization.
211
+ This applies when they message the agent and when they click a card.
212
+ **Approve** and **Deny** are card clicks. A sender with no role is
213
+ refused. A sender Teams does not list is refused too.
214
+
215
+ The agent posts one short reply to a refused sender. It posts at most
216
+ once per conversation and sender per hour. The default text is "I can
217
+ only help members of this organization. Ask the agent owner to allow
218
+ guests."
219
+
220
+ Set `policy.refusalMessage` to change the default text. Set
221
+ `policy.refusalMessage` to `false` to stay silent. Silence applies to a
222
+ refused sender and to a sender the lookup could not verify.
223
+
224
+ A failed lookup gets the reply "I couldn't verify your access, try again
225
+ shortly." The agent does not reply to a card click from a refused sender.
226
+ The agent ignores a card click from a bot, including a bot that
227
+ `engagement.botMentions` allows. The agent does not reply to an activity
228
+ from another tenant.
229
+
230
+ To let guests and external members in, set `blockExternals` to `false`.
231
+
232
+ ```ts
233
+ export default teamsChannel({ policy: { blockExternals: false } });
234
+ ```
235
+
236
+ ```ts
237
+ export default teamsChannel({
238
+ policy: {
239
+ refusalMessage: "Ask your team owner to add you to this organization.",
240
+ },
241
+ });
242
+ ```
243
+
244
+ ## Welcome message
245
+
246
+ When someone installs the app in a conversation, the agent posts one
247
+ greeting there. Teams reports the install as an `installationUpdate`
248
+ activity whose action is `add`. The greeting does not start a model turn.
249
+ The agent posts it once per conversation.
250
+
251
+ The default text is "Hi! Mention me in a channel, or message me here, to
252
+ get started."
253
+
254
+ Set `welcome` to change the greeting. Set `welcome` to `false` to turn
255
+ it off.
256
+
257
+ ```ts
258
+ export default teamsChannel({
259
+ welcome: "Hi. Mention me when you want help with a laptop.",
260
+ });
261
+ ```
262
+
263
+ ## Messaging endpoint
264
+
265
+ Under `agent-sdk dev` or self-hosted `agent-sdk serve`, the Azure Bot's
266
+ messaging endpoint is the server's public origin plus the channel's path:
267
+
268
+ ```text
269
+ https://<origin>/<slug>/v1/channels/<channel>
270
+ ```
271
+
272
+ `<slug>` is the agent's slug and `<channel>` is the channel file's name, so
273
+ `bot/channels/teams.ts` in the `helm` agent answers at
274
+ `https://<origin>/helm/v1/channels/teams`. The URL has no trailing slash.
275
+ With `teamsChannel({ path: "/messages" })`, the channel appends that path:
276
+ `https://<origin>/helm/v1/channels/teams/messages`. A hosted deploy has a
277
+ different URL; see [Deploy](#deploy).
278
+
279
+ ## Test locally
280
+
281
+ Teams reaches the bot only at a public HTTPS URL. `agent-sdk dev` opens a
282
+ `cloudflared` tunnel and prints the messaging endpoint on the tunnel's
283
+ origin:
284
+
285
+ ```bash
286
+ agent-sdk dev ./helm
287
+ ```
288
+
289
+ Copy the printed URL into the Azure Bot's **Messaging endpoint**, then
290
+ mention the bot in Teams. `--tunnel devtunnel` keeps one URL across
291
+ restarts. Next to a plain `agent-sdk serve`, `agent-sdk channels teams
292
+ forward` opens the same tunnel. `agent-sdk dev --mode single` serves one agent
293
+ without a slug, so its endpoint is `https://<origin>/v1/channels/teams`.
294
+ Without `--mode single`, the endpoint includes the agent's slug:
295
+ `https://<origin>/helm/v1/channels/teams`.
296
+
297
+ To run your own tunnel instead, serve with plain `agent-sdk serve`, which
298
+ opens no tunnel, and point `cloudflared` at its port:
299
+
300
+ ```bash
301
+ agent-sdk serve --dir ./helm --mode single --port 3978
302
+ cloudflared tunnel --url http://localhost:3978
303
+ ```
304
+
305
+ Add `--protocol http2` to `cloudflared` if your network blocks QUIC. Set the
306
+ Azure Bot's **Messaging endpoint** to the printed `<public-url>` plus
307
+ `/v1/channels/teams`, or `<public-url>/helm/v1/channels/teams` without
308
+ `--mode single`. The built-in tunnel forwards only `POST` requests to the
309
+ Teams messaging paths. A tunnel you run yourself exposes every route on the
310
+ port.
311
+
312
+ Requests through a tunnel always get the Bot Framework token check, so only
313
+ Teams can start turns there. A tunnel adds proxy headers or forwards its
314
+ public hostname, and the dev exception for unsigned activities refuses both.
315
+ To replay a saved activity without Teams, POST it to the same path on
316
+ `http://127.0.0.1:<port>` from the same machine; `agent-sdk dev` admits
317
+ unsigned activities from loopback only.
318
+
319
+ ## Deploy
320
+
321
+ Hosted, the agent needs its three secrets:
322
+
323
+ ```ts
324
+ // bot/agent.ts
325
+ import { defineAgent } from "@grok/agent-sdk";
326
+
327
+ export default defineAgent({
328
+ hosting: {
329
+ secretNames: ["TEAMS_APP_ID", "TEAMS_APP_PASSWORD", "TEAMS_TENANT_ID"],
330
+ },
331
+ });
332
+ ```
333
+
334
+ Hosting adds the Microsoft hosts that a Teams channel calls
335
+ (`login.microsoftonline.com`, `login.botframework.com`, and
336
+ `smba.trafficmanager.net`), so you do not list them in `egressDomains`.
337
+ Your team's network settings still apply to them. If your team restricts
338
+ egress, its allowlist must include all three hosts, or the agent's replies
339
+ fail.
340
+
341
+ An `envPrefix` changes the secret names. With
342
+ `teamsChannel({ envPrefix: "ECHO" })`, list `ECHO_TEAMS_APP_ID`,
343
+ `ECHO_TEAMS_APP_PASSWORD`, and `ECHO_TEAMS_TENANT_ID` in `secretNames`, and
344
+ set those names with `agent-sdk secret set`.
345
+
346
+ ```bash
347
+ agent-sdk deploy --dir . --slug helpdesk
348
+ agent-sdk secret set helpdesk TEAMS_APP_ID
349
+ agent-sdk secret set helpdesk TEAMS_APP_PASSWORD
350
+ agent-sdk secret set helpdesk TEAMS_TENANT_ID
351
+ ```
352
+
353
+ `agent-sdk deploy` prints the hosted messaging endpoint on a `public:`
354
+ line that ends in `/v1/channels/teams`. Set the Azure Bot's **Messaging
355
+ endpoint** to that URL, not to the slug URL from local testing. With a
356
+ custom `path`, add it after the printed URL.
357
+
358
+ On hosting, Cursor checks the Bot Framework token and the tenant before
359
+ the agent starts. Activities that the channel cannot act on, such as a
360
+ reaction or an unmentioned post outside `channelPosts`, stop there and
361
+ use no compute. Each personal or group chat is one session, and each
362
+ channel reply chain is one session. Tool approvals work on hosting: an
363
+ Approve or Deny click reaches the turn that waits for it, and a call that
364
+ nobody approves in 10 minutes is denied.
365
+
366
+ Hosting runs Teams channels only in the commercial Microsoft cloud, and
367
+ only for teams that have Teams channels turned on. The deploy fails
368
+ otherwise.
369
+
370
+ ## How Teams differs from Slack
371
+
372
+ | | Slack | Teams |
373
+ | --- | --- | --- |
374
+ | App | Your Slack app's bot and app tokens | Your Azure Bot's app ID, client secret, and tenant |
375
+ | Local transport | Socket Mode, no public URL | `agent-sdk dev` opens a tunnel to the messaging endpoint |
376
+ | Watch channel posts | `message.channels` subscription | `ChannelMessage.Read.Group` consent at install |
377
+ | Threads | Every message can start a thread | Reply chains in channels; personal and group chats are one conversation each |
378
+ | Bot-to-bot wakes | `maxDepth` from message metadata, plus per-thread caps | Per-thread caps only |
379
+ | Progress | Status chip, streaming API, tool and reasoning cards | Typing indicator, or one edited message in stream mode |
380
+ | Approvals | Block Kit buttons | Adaptive Card buttons |
381
+ | Hosted sessions | One per thread | One per chat, or one per channel reply chain |
382
+ | Not available in Teams | | Reactions, file uploads and downloads, suggested prompts, `eval` commands, edit debounce |
383
+
384
+ ## Related
385
+
386
+ - [Slack](./slack.md)
387
+ - [Webhooks](./webhooks.md)
388
+ - [Deployment](../deployment.md)
389
+ - [Channels reference](../reference/channels.md)
@@ -0,0 +1,232 @@
1
+ ---
2
+ title: "Workload identity (OIDC)"
3
+ description: "Mint short-lived OIDC tokens from a deployed Agent SDK agent to authenticate with cloud providers and external services without static keys."
4
+ ---
5
+
6
+ # Authenticate deployed agents with OIDC
7
+
8
+ 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.
9
+
10
+ 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:
11
+
12
+ | Aspect | Cloud Agents | Agent SDK deployments |
13
+ | --- | --- | --- |
14
+ | Audience allowlist | Any valid `aud` string | Must be declared in `hosting.oidc.audiences`; undeclared audiences return HTTP `400`. |
15
+ | 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`. |
16
+ | Runtime claim (`agent_runtime`) | `"managed"` or `"self_hosted"` | `"agent_sdk"`. |
17
+ | Additional claims | Includes owner, team, repository, branch, and turn claims | See [Token claims](#token-claims). No owner, team, repository, or session claims. |
18
+
19
+ ## Declare allowed audiences
20
+
21
+ 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`.
22
+
23
+ ```ts
24
+ // bot/agent.ts
25
+ import { defineAgent } from "@grok/agent-sdk";
26
+
27
+ export default defineAgent({
28
+ hosting: {
29
+ egressDomains: ["sts.amazonaws.com"],
30
+ oidc: {
31
+ audiences: ["sts.amazonaws.com"],
32
+ },
33
+ },
34
+ });
35
+ ```
36
+
37
+ 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).
38
+
39
+ Audience rules:
40
+
41
+ - List exact audience strings only. Wildcards (`*`) are rejected.
42
+ - Declare at most 8 audiences per deployment.
43
+ - Each audience must be 1 to 512 printable ASCII characters with no spaces or control characters.
44
+ - Cursor-reserved audiences (such as `cursor.com` hosts) are rejected at deploy time and at mint time.
45
+ - Cursor saves `hosting.oidc.audiences` when you deploy. Redeploy to add or remove an audience.
46
+
47
+ ## Mint a token with `getOidcToken`
48
+
49
+ Import `getOidcToken` from `@grok/agent-sdk` and call it inside a tool, channel handler, or callback when your agent needs a token.
50
+
51
+ ```ts
52
+ // bot/tools/assume_aws_role.ts
53
+ import { getOidcToken, OidcTokenError } from "@grok/agent-sdk";
54
+ import { defineTool } from "@grok/agent-sdk/tools";
55
+ import { z } from "zod";
56
+
57
+ export default defineTool({
58
+ description: "Exchange an OIDC token for temporary AWS credentials.",
59
+ inputSchema: z.object({}),
60
+ async execute() {
61
+ let token: string;
62
+ try {
63
+ const result = await getOidcToken("sts.amazonaws.com");
64
+ token = result.token;
65
+ } catch (error) {
66
+ if (error instanceof OidcTokenError) {
67
+ return {
68
+ ok: false,
69
+ code: error.code,
70
+ status: error.status ?? null,
71
+ reason: error.reason ?? null,
72
+ };
73
+ }
74
+ throw error;
75
+ }
76
+
77
+ const body = new URLSearchParams({
78
+ Action: "AssumeRoleWithWebIdentity",
79
+ Version: "2011-06-15",
80
+ RoleArn: "arn:aws:iam::123456789012:role/my-agent-role",
81
+ RoleSessionName: "agent-sdk-session",
82
+ WebIdentityToken: token,
83
+ });
84
+
85
+ const response = await fetch("https://sts.amazonaws.com/", {
86
+ method: "POST",
87
+ headers: {
88
+ "content-type": "application/x-www-form-urlencoded",
89
+ accept: "application/json",
90
+ },
91
+ body,
92
+ });
93
+
94
+ if (!response.ok) {
95
+ return { ok: false, stsStatus: response.status };
96
+ }
97
+ return { ok: true };
98
+ },
99
+ });
100
+ ```
101
+
102
+ Call `getOidcToken` inside a tool, handler, or callback, not at module load time.
103
+
104
+ ### Return value and caching
105
+
106
+ `getOidcToken(audience: string)` returns `Promise<OidcToken>`:
107
+
108
+ | Field | Type | Meaning |
109
+ | --- | --- | --- |
110
+ | `token` | `string` | Compact RS256-signed JWT. Never log it. |
111
+ | `expiresAt` | `Date` | Token expiration timestamp from the socket's `expires_at` field. |
112
+
113
+ `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.
114
+
115
+ ### Error handling
116
+
117
+ `getOidcToken` throws `OidcTokenError` (a subclass of `Error` with `name === "OidcTokenError"`) on failure:
118
+
119
+ | Field | Type | Meaning |
120
+ | --- | --- | --- |
121
+ | `code` | `OidcTokenErrorCode` | Failure category listed below. |
122
+ | `status` | `number \| undefined` | HTTP status code from the identity socket when an HTTP response was received. |
123
+ | `reason` | `string \| undefined` | Machine-readable `error` string from the socket's JSON error body, when present. |
124
+
125
+ `OidcTokenErrorCode` values:
126
+
127
+ | `code` | Typical `status` | Cause | What to do |
128
+ | --- | --- | --- | --- |
129
+ | `"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. |
130
+ | `"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. |
131
+ | `"rate_limited"` | `429` | The per-pod mint rate limit was exceeded. | Back off and retry. Prefer `getOidcToken` caching over repeated raw calls. |
132
+ | `"timeout"` | `undefined` | The mint request did not finish within 20 seconds. | Retry with backoff. |
133
+ | `"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. |
134
+ | `"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. |
135
+
136
+ 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.
137
+
138
+ ## Call the identity socket directly
139
+
140
+ 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).
141
+
142
+ 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):
143
+
144
+ ```bash
145
+ curl --silent --show-error --fail-with-body \
146
+ --unix-socket "${CURSOR_AGENT_SOCKET:-/run/cursor/api.sock}" \
147
+ -H 'Content-Type: application/json' \
148
+ -d '{"aud":"sts.amazonaws.com"}' \
149
+ http://localhost/v1/tokens/oidc
150
+ ```
151
+
152
+ Request fields:
153
+
154
+ - `aud` (required string): exact audience declared in `hosting.oidc.audiences`.
155
+ - `nonce` (optional string): opaque printable ASCII string with no spaces, up to 512 characters, echoed into the JWT `nonce` claim.
156
+
157
+ Success response (`200 OK`):
158
+
159
+ ```json
160
+ {
161
+ "token": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ii4uLiIsInR5cCI6IkpXVCJ9...",
162
+ "expires_at": 1785500000
163
+ }
164
+ ```
165
+
166
+ `expires_at` is the token expiration in Unix seconds and matches the JWT `exp` claim.
167
+
168
+ 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.
169
+
170
+ 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.
171
+
172
+ ## Token claims
173
+
174
+ Tokens are signed with `RS256` and include `alg`, `kid`, and `typ: "JWT"` in the header. Every Agent SDK token carries these claims:
175
+
176
+ | Claim | Value | Notes |
177
+ | --- | --- | --- |
178
+ | `iss` | `https://api.cursor.com` | Same issuer as Cloud Agents. |
179
+ | `sub` | `agent_sdk_deployment_id:<deployment-id>` | `<deployment-id>` is the deployment public ID (`asd_` followed by 32 lowercase hex characters). |
180
+ | `aud` | Requested audience string | Always a single string matching an entry in `hosting.oidc.audiences`. |
181
+ | `iat` | Unix seconds | Issued-at time. |
182
+ | `nbf` | `iat - 5` | Allows 5 seconds of clock skew. |
183
+ | `exp` | `iat + 300` | Valid for 5 minutes. |
184
+ | `jti` | UUID | Unique token ID per mint. |
185
+ | `agent_runtime` | `"agent_sdk"` | Identifies an Agent SDK deployment token. |
186
+ | `nonce` | Optional string | Present only when sent on a raw socket request. |
187
+
188
+ ## Configure an AWS IAM trust policy
189
+
190
+ 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).
191
+ 2. Declare `"sts.amazonaws.com"` in `hosting.oidc.audiences` and `hosting.egressDomains`, then deploy your agent.
192
+ 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.
193
+ 4. Attach a trust policy to your IAM role that pins both `api.cursor.com:aud` and `api.cursor.com:sub` with `StringEquals`:
194
+
195
+ ```json
196
+ {
197
+ "Version": "2012-10-17",
198
+ "Statement": [
199
+ {
200
+ "Effect": "Allow",
201
+ "Principal": {
202
+ "Federated": "arn:aws:iam::123456789012:oidc-provider/api.cursor.com"
203
+ },
204
+ "Action": "sts:AssumeRoleWithWebIdentity",
205
+ "Condition": {
206
+ "StringEquals": {
207
+ "api.cursor.com:aud": "sts.amazonaws.com",
208
+ "api.cursor.com:sub": "agent_sdk_deployment_id:asd_3f9c0a7b1d2e4f60a9b8c7d6e5f40312"
209
+ }
210
+ }
211
+ }
212
+ ]
213
+ }
214
+ ```
215
+
216
+ Never replace the `sub` value with a wildcard such as `agent_sdk_deployment_id:*`. A wildcard trusts every Agent SDK deployment on Cursor.
217
+
218
+ ## Verification, rate limits, and trust model
219
+
220
+ 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).
221
+
222
+ Keep the deployment trust boundary in mind when scoping external roles:
223
+
224
+ - 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`.
225
+ - The platform sets `sub` from the deployment identity, so one deployment cannot impersonate another.
226
+ - 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.
227
+
228
+ ## Related
229
+
230
+ - [Deployment](../deployment.md)
231
+ - [Agent config](../reference/agent-config.md)
232
+ - [Cloud Agents OIDC tokens](https://cursor.com/docs/cloud-agent/identity)
@@ -32,7 +32,7 @@ export default defineAgent({
32
32
  | `description` | string | What the agent is for. Required on subagents, where the parent model reads it to decide when to delegate. |
33
33
  | `instructions` | string | Inline instructions for subagents and generated configs. Prefer `instructions.md`. |
34
34
  | `local` | `{ cwd?, workspaceDir?, sandbox? }` | Defaults for a local run. See [Local options](#local-options). |
35
- | `hosting` | `{ egressDomains?, secretNames? }` | The egress allowlist and expected secret names that `agent-sdk deploy` reads. Mounted [extensions](./extensions.md#build-an-extension) add their own. |
35
+ | `hosting` | `{ egressDomains?, secretNames?, oidc? }` | The egress allowlist, expected secret names, and [OIDC token audiences](../guides/workload-identity.md) that `agent-sdk deploy` reads. Mounted [extensions](./extensions.md#build-an-extension) add their own egress hosts and secrets. |
36
36
  | `concurrency` | `{ maxRunningTurns? }` | Agent-wide limit on concurrent turns. See [Concurrency](#concurrency). |
37
37
  | `builtinTools` | `{ reminders? }` | Opt-in tools that Agent SDK provides. See [Built-in tools](#built-in-tools). |
38
38
  | `tools` | `ToolName[]` | Allowlist of built-in tools. Omit it for the full standard toolset. See [Harness tools](#harness-tools). |
@@ -150,6 +150,7 @@ Import each one from `@grok/agent-sdk/channels/<name>`.
150
150
  | Function | Details |
151
151
  | --- | --- |
152
152
  | `slackChannel()` | [Slack](../guides/slack.md) |
153
+ | `teamsChannel()` | [Microsoft Teams](../guides/teams.md) |
153
154
  | `githubChannel()` | [GitHub](../guides/github.md) |
154
155
  | `gitlabChannel()` | [GitLab](../guides/gitlab.md) |
155
156
  | `bitbucketChannel()` | [Bitbucket](../guides/bitbucket.md) |