@cursor/bdk 0.2.22 → 0.2.24

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 (306) hide show
  1. package/dist/artifacts.d.ts +1 -1
  2. package/dist/artifacts.js +1 -1
  3. package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
  4. package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
  5. package/dist/channels/deployments/deployments-channel.js +1 -1
  6. package/dist/channels/github/github-channel.js +1 -1
  7. package/dist/channels/gitlab/gitlab-channel.js +1 -1
  8. package/dist/channels/issues/issues-channel.js +1 -1
  9. package/dist/channels/origin/origin-channel.js +1 -1
  10. package/dist/channels/runs/runs-channel.js +1 -1
  11. package/dist/channels/slack/manifest.d.ts.map +1 -1
  12. package/dist/channels/slack/manifest.js +10 -5
  13. package/dist/channels/slack/tool-approval-events.js +5 -5
  14. package/dist/channels/slack/types.d.ts +7 -0
  15. package/dist/channels/slack/types.d.ts.map +1 -1
  16. package/dist/channels.d.ts +8 -1
  17. package/dist/channels.d.ts.map +1 -1
  18. package/dist/channels.js +33 -6
  19. package/dist/docs/404.html +3 -3
  20. package/dist/docs/assets/{app.BD1yvHJK.js → app.DTIg0uKK.js} +4 -4
  21. package/dist/docs/assets/chunks/@localSearchIndexroot.3ebvCWKy.js +1 -0
  22. package/dist/docs/assets/chunks/{VPLocalSearchBox.D25E8cn2.js → VPLocalSearchBox.BpJoSaxi.js} +2 -2
  23. package/dist/docs/assets/chunks/{arc.1hKM2X5X.js → arc.ylgNvRNq.js} +1 -1
  24. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.B1jE4xrG.js → architectureDiagram-Q4EWVU46.BMrNJqYk.js} +1 -1
  25. package/dist/docs/assets/chunks/{baseUniq.BwPi_maB.js → baseUniq.BBWUEqf9.js} +1 -1
  26. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.Cpy78QaZ.js → blockDiagram-DXYQGD6D.DFMu-Vza.js} +1 -1
  27. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.DkCQNehT.js → c4Diagram-AHTNJAMY.8nkAAxWv.js} +1 -1
  28. package/dist/docs/assets/chunks/channel.BOebySCN.js +1 -0
  29. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.BuR2bNxe.js → chunk-4BX2VUAB.sO-z2Bag.js} +1 -1
  30. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.C24IlKyd.js → chunk-4TB4RGXK.BMROzTMq.js} +1 -1
  31. package/dist/docs/assets/chunks/{chunk-55IACEB6.CRD5fIjA.js → chunk-55IACEB6.X81urwg7.js} +1 -1
  32. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.gKhxQpy2.js → chunk-EDXVE4YY.eaZVFLZM.js} +1 -1
  33. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DPlyJIaG.js → chunk-FMBD7UC4.CmZhzstR.js} +1 -1
  34. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.DfDSVvIq.js → chunk-OYMX7WX6.CTezt9Lc.js} +1 -1
  35. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.CsA80Wio.js → chunk-QZHKN3VN.s-T8zukB.js} +1 -1
  36. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.BtXaaMC_.js → chunk-YZCP3GAM.DN4Nhy-D.js} +1 -1
  37. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.C55IaN-T.js +1 -0
  38. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.C55IaN-T.js +1 -0
  39. package/dist/docs/assets/chunks/clone.D06pA7ML.js +1 -0
  40. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.Bw9v-Pfp.js → cose-bilkent-S5V4N54A.Cqyp4BUH.js} +1 -1
  41. package/dist/docs/assets/chunks/{dagre-KV5264BT.Wc53s510.js → dagre-KV5264BT.BIECOiqR.js} +1 -1
  42. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DxJJrlh5.js → diagram-5BDNPKRD.1tLyWoTg.js} +1 -1
  43. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Ldxa4MKP.js → diagram-G4DWMVQ6.BVY_6VMO.js} +1 -1
  44. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.D30RWuU-.js → diagram-MMDJMWI5.BSZ7xiBB.js} +1 -1
  45. package/dist/docs/assets/chunks/{diagram-TYMM5635.BuJ0aD65.js → diagram-TYMM5635.Bho6GmLh.js} +1 -1
  46. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.2N-5dVK2.js → erDiagram-SMLLAGMA.A0yVIANn.js} +1 -1
  47. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.B_te6Lre.js → flowDiagram-DWJPFMVM.ZMgbllH6.js} +1 -1
  48. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.CuNbn0Wd.js → ganttDiagram-T4ZO3ILL.BCCPBhXo.js} +1 -1
  49. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.C1uOicx6.js → gitGraphDiagram-UUTBAWPF.BOkL0BbA.js} +1 -1
  50. package/dist/docs/assets/chunks/{graph.lSlSs4kh.js → graph.DMyZPu86.js} +1 -1
  51. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.Cw_LmsnD.js → infoDiagram-42DDH7IO.CjG1IiEw.js} +1 -1
  52. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DikoN3ai.js → ishikawaDiagram-UXIWVN3A.UCe-kq9g.js} +1 -1
  53. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.buwzIgeY.js → journeyDiagram-VCZTEJTY.3WyOK_eY.js} +1 -1
  54. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.yacNqa4l.js → kanban-definition-6JOO6SKY.WoRG2qY1.js} +1 -1
  55. package/dist/docs/assets/chunks/{layout.CPlTUhtI.js → layout.DV07xDd5.js} +1 -1
  56. package/dist/docs/assets/chunks/{linear.BpHFbx_2.js → linear.CTO8mN6o.js} +1 -1
  57. package/dist/docs/assets/chunks/{min.B_dSxH85.js → min.SvTtcKuZ.js} +1 -1
  58. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.BO5-vmxy.js → mindmap-definition-QFDTVHPH.DMGgQ-HB.js} +1 -1
  59. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.Bwj1Zq54.js → pieDiagram-DEJITSTG.B7851apI.js} +1 -1
  60. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.D5dcUqJC.js → quadrantDiagram-34T5L4WZ.CEqyypIX.js} +1 -1
  61. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CCP5yuT4.js → requirementDiagram-MS252O5E.C3Mwsw-H.js} +1 -1
  62. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.BWAu-_Jq.js → sankeyDiagram-XADWPNL6.DyYK0XxY.js} +1 -1
  63. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.w545hYyz.js → sequenceDiagram-FGHM5R23.SiQPH-XM.js} +1 -1
  64. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.CxcpDNk2.js → stateDiagram-FHFEXIEX.CTJMsP4p.js} +1 -1
  65. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DddRVjeq.js +1 -0
  66. package/dist/docs/assets/chunks/{theme.DSJaK7i1.js → theme.DJo4my9R.js} +2 -2
  67. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.2WxkfxRf.js → timeline-definition-GMOUNBTQ.CxSNRlQ6.js} +1 -1
  68. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.BGZwcK-Z.js → vennDiagram-DHZGUBPP.BdoJskyD.js} +1 -1
  69. package/dist/docs/assets/chunks/wardley-RL74JXVD.CVCRSuQK.js +162 -0
  70. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.oryRmynQ.js → wardleyDiagram-NUSXRM2D.IjIbFn_F.js} +1 -1
  71. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.Bq7gMvIU.js → xychartDiagram-5P7HB3ND.CPUxDZLH.js} +1 -1
  72. package/dist/docs/assets/{deployment.md.CtSJ6sF9.js → deployment.md.3MMWuPeV.js} +5 -5
  73. package/dist/docs/assets/{deployment.md.CtSJ6sF9.lean.js → deployment.md.3MMWuPeV.lean.js} +1 -1
  74. package/dist/docs/assets/{guides_cloud-agents.md.CBK7W0-O.js → guides_cloud-agents.md.BzbzcOyj.js} +2 -2
  75. package/dist/docs/assets/{guides_cloud-agents.md.CBK7W0-O.lean.js → guides_cloud-agents.md.BzbzcOyj.lean.js} +1 -1
  76. package/dist/docs/assets/guides_migrate.md.CQlGaBKX.js +7 -0
  77. package/dist/docs/assets/{guides_migrate.md.DZBL7dqT.lean.js → guides_migrate.md.CQlGaBKX.lean.js} +1 -1
  78. package/dist/docs/assets/{guides_opentelemetry.md.ByW1Fs7b.js → guides_opentelemetry.md.Ck1o2frw.js} +11 -3
  79. package/dist/docs/assets/{guides_opentelemetry.md.ByW1Fs7b.lean.js → guides_opentelemetry.md.Ck1o2frw.lean.js} +1 -1
  80. package/dist/docs/assets/{reference_agent-config.md.DYA6ge6t.js → reference_agent-config.md.IplwL25I.js} +1 -2
  81. package/dist/docs/assets/{reference_agent-config.md.DYA6ge6t.lean.js → reference_agent-config.md.IplwL25I.lean.js} +1 -1
  82. package/dist/docs/assets/{reference_cli.md.Bkrsce22.js → reference_cli.md.DB7Llw3T.js} +3 -3
  83. package/dist/docs/assets/{reference_cli.md.Bkrsce22.lean.js → reference_cli.md.DB7Llw3T.lean.js} +1 -1
  84. package/dist/docs/assets/{reference_extensions.md.OUacPetl.js → reference_extensions.md.DKxTuCIw.js} +11 -8
  85. package/dist/docs/assets/{reference_extensions.md.OUacPetl.lean.js → reference_extensions.md.DKxTuCIw.lean.js} +1 -1
  86. package/dist/docs/assets/{reference_instructions.md.DrcHZXig.js → reference_instructions.md.BYMVxAkw.js} +4 -4
  87. package/dist/docs/assets/{reference_instructions.md.DrcHZXig.lean.js → reference_instructions.md.BYMVxAkw.lean.js} +1 -1
  88. package/dist/docs/assets/{style.Dwls12uf.css → style.nMsabY-V.css} +1 -1
  89. package/dist/docs/assets/templates_agentic-owners.md.CTEnR0jp.js +13 -0
  90. package/dist/docs/assets/{templates_agentic-owners.md.CvmABtia.lean.js → templates_agentic-owners.md.CTEnR0jp.lean.js} +1 -1
  91. package/dist/docs/building-with-agents.html +37 -37
  92. package/dist/docs/deployment.html +42 -42
  93. package/dist/docs/deployment.md +9 -4
  94. package/dist/docs/evals.html +37 -37
  95. package/dist/docs/guides/agent-to-agent.html +37 -37
  96. package/dist/docs/guides/bitbucket.html +37 -37
  97. package/dist/docs/guides/cloud-agents.html +38 -38
  98. package/dist/docs/guides/cloud-agents.md +1 -0
  99. package/dist/docs/guides/convert-automation.html +37 -37
  100. package/dist/docs/guides/export-grokbot.html +37 -37
  101. package/dist/docs/guides/github.html +37 -37
  102. package/dist/docs/guides/gitlab.html +37 -37
  103. package/dist/docs/guides/grokbot-agents.html +37 -37
  104. package/dist/docs/guides/hooks.html +37 -37
  105. package/dist/docs/guides/improve.html +37 -37
  106. package/dist/docs/guides/jev.html +37 -37
  107. package/dist/docs/guides/mcp-oauth.html +37 -37
  108. package/dist/docs/guides/migrate.html +39 -39
  109. package/dist/docs/guides/migrate.md +46 -4
  110. package/dist/docs/guides/opentelemetry.html +47 -39
  111. package/dist/docs/guides/opentelemetry.md +48 -2
  112. package/dist/docs/guides/slack.html +37 -37
  113. package/dist/docs/guides/webhooks.html +37 -37
  114. package/dist/docs/hashmap.json +1 -1
  115. package/dist/docs/hillclimbing.html +37 -37
  116. package/dist/docs/index.html +37 -37
  117. package/dist/docs/llms-full.txt +195 -49
  118. package/dist/docs/quickstart.html +37 -37
  119. package/dist/docs/reference/agent-config.html +38 -39
  120. package/dist/docs/reference/agent-config.md +0 -1
  121. package/dist/docs/reference/artifacts.html +37 -37
  122. package/dist/docs/reference/channels.html +37 -37
  123. package/dist/docs/reference/cli.html +40 -40
  124. package/dist/docs/reference/cli.md +16 -5
  125. package/dist/docs/reference/connections.html +37 -37
  126. package/dist/docs/reference/evals.html +37 -37
  127. package/dist/docs/reference/extensions.html +47 -44
  128. package/dist/docs/reference/extensions.md +15 -9
  129. package/dist/docs/reference/hooks.html +37 -37
  130. package/dist/docs/reference/http-api.html +37 -37
  131. package/dist/docs/reference/instructions.html +40 -40
  132. package/dist/docs/reference/instructions.md +5 -1
  133. package/dist/docs/reference/memory.html +37 -37
  134. package/dist/docs/reference/playground.html +36 -36
  135. package/dist/docs/reference/project-layout.html +37 -37
  136. package/dist/docs/reference/prompt.html +37 -37
  137. package/dist/docs/reference/schedules.html +37 -37
  138. package/dist/docs/reference/sessions.html +36 -36
  139. package/dist/docs/reference/skills.html +37 -37
  140. package/dist/docs/reference/subagents.html +37 -37
  141. package/dist/docs/reference/tools.html +37 -37
  142. package/dist/docs/templates/agentic-owners.html +42 -43
  143. package/dist/docs/templates/agentic-owners.md +55 -23
  144. package/dist/docs/templates/grokbot-agents.html +37 -37
  145. package/dist/docs/templates/security-reviewer.html +37 -37
  146. package/dist/docs/templates/thermo-quality-review.html +37 -37
  147. package/dist/docs/templates/thermo-review.html +37 -37
  148. package/dist/docs/templates/triage.html +37 -37
  149. package/dist/docs/troubleshooting.html +36 -36
  150. package/dist/extensions/cursor-cloud-agents/extension.d.ts +2 -0
  151. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  152. package/dist/extensions/cursor-cloud-agents/extension.js +2 -1
  153. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +1 -0
  154. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
  155. package/dist/extensions/cursor-cloud-agents/lib/backend.js +2 -1
  156. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
  157. package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts +1 -1
  158. package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts.map +1 -1
  159. package/dist/extensions/cursor-cloud-agents/lib/inputs.js +1 -1
  160. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +1 -1
  161. package/dist/extensions/cursor-cloud-agents/tools/launch.js +1 -1
  162. package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
  163. package/dist/extensions/cursor-cloud-agents/tools/reply.js +1 -1
  164. package/dist/extensions/cursor-grokbot-agents/extension.js +1 -1
  165. package/dist/extensions/cursor-grokbot-agents/lib/backend.js +1 -1
  166. package/dist/extensions/cursor-grokbot-agents/lib/contacts.js +1 -1
  167. package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts +1 -1
  168. package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts.map +1 -1
  169. package/dist/extensions/cursor-grokbot-agents/lib/inputs.js +1 -1
  170. package/dist/extensions/cursor-grokbot-agents/tools/ask.js +1 -1
  171. package/dist/extensions/cursor-grokbot-agents/tools/check.js +1 -1
  172. package/dist/extensions/cursor-grokbot-agents/tools/interrupt.js +1 -1
  173. package/dist/extensions/cursor-grokbot-agents/tools/list.js +1 -1
  174. package/dist/extensions/improve/extension.js +1 -1
  175. package/dist/extensions/jev/extension.js +1 -1
  176. package/dist/extensions/jev/tools/evaluate.js +1 -1
  177. package/dist/extensions/slack-communication/extension.js +1 -1
  178. package/dist/extensions/slack-communication/tools/delete-message.js +1 -1
  179. package/dist/extensions/slack-communication/tools/edit-message.js +1 -1
  180. package/dist/extensions/slack-communication/tools/post-card.js +1 -1
  181. package/dist/extensions/slack-communication/tools/post-file.js +1 -1
  182. package/dist/extensions/slack-communication/tools/post-update.js +1 -1
  183. package/dist/extensions/slack-communication/tools/react.js +1 -1
  184. package/dist/extensions/slack-communication/tools/set-status.js +1 -1
  185. package/dist/extensions.d.ts +1 -1
  186. package/dist/extensions.js +1 -1
  187. package/dist/internal/builtin-tools/artifacts.js +1 -1
  188. package/dist/internal/builtin-tools/reminders.js +1 -1
  189. package/dist/internal/cli-deploy.d.ts +3 -3
  190. package/dist/internal/cli-deploy.d.ts.map +1 -1
  191. package/dist/internal/cli-deploy.js +63 -21
  192. package/dist/internal/cli-migrate.d.ts.map +1 -1
  193. package/dist/internal/cli-migrate.js +227 -12
  194. package/dist/internal/cli-slack.d.ts.map +1 -1
  195. package/dist/internal/cli-slack.js +56 -3
  196. package/dist/internal/convert-automation/convert-workflow.js +1 -1
  197. package/dist/internal/convert-grokbot/answers.js +1 -1
  198. package/dist/internal/convert-grokbot/recipe.d.ts +1 -1
  199. package/dist/internal/convert-grokbot/recipe.d.ts.map +1 -1
  200. package/dist/internal/convert-grokbot/recipe.js +1 -1
  201. package/dist/internal/cursor/backend-client.d.ts +1 -1
  202. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  203. package/dist/internal/cursor/backend-client.js +1 -1
  204. package/dist/internal/cursor/credentials.d.ts +1 -1
  205. package/dist/internal/cursor/credentials.d.ts.map +1 -1
  206. package/dist/internal/cursor/credentials.js +1 -1
  207. package/dist/internal/deploy-client.d.ts +7 -0
  208. package/dist/internal/deploy-client.d.ts.map +1 -1
  209. package/dist/internal/deploy-client.js +16 -2
  210. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  211. package/dist/internal/deploy-manifest.js +2 -1
  212. package/dist/internal/discovery/cursor-plugin.js +1 -1
  213. package/dist/internal/factory-resource-channel.d.ts +1 -1
  214. package/dist/internal/factory-resource-channel.d.ts.map +1 -1
  215. package/dist/internal/filesystem/sdk-schemas.d.ts +1 -1
  216. package/dist/internal/filesystem/sdk-schemas.d.ts.map +1 -1
  217. package/dist/internal/filesystem/sdk-schemas.js +1 -1
  218. package/dist/internal/filesystem/tools.js +1 -1
  219. package/dist/internal/host-otel.d.ts +2 -1
  220. package/dist/internal/host-otel.d.ts.map +1 -1
  221. package/dist/internal/host-otel.js +20 -6
  222. package/dist/internal/hosted-delivery-protocol.d.ts +4 -0
  223. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  224. package/dist/internal/hosted-delivery.d.ts +7 -0
  225. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  226. package/dist/internal/hosted-delivery.js +19 -17
  227. package/dist/internal/hosting.d.ts +6 -0
  228. package/dist/internal/hosting.d.ts.map +1 -1
  229. package/dist/internal/hosting.js +9 -0
  230. package/dist/internal/init-scaffold.js +1 -1
  231. package/dist/internal/interview/agent-questions.d.ts +1 -1
  232. package/dist/internal/interview/agent-questions.d.ts.map +1 -1
  233. package/dist/internal/interview/agent-questions.js +1 -1
  234. package/dist/internal/interview/question.d.ts +1 -1
  235. package/dist/internal/interview/question.d.ts.map +1 -1
  236. package/dist/internal/interview/question.js +1 -1
  237. package/dist/internal/json-schema.d.ts +1 -1
  238. package/dist/internal/json-schema.d.ts.map +1 -1
  239. package/dist/internal/json-schema.js +1 -1
  240. package/dist/internal/mcp-endpoint.js +1 -1
  241. package/dist/internal/otel/collector.d.ts.map +1 -1
  242. package/dist/internal/otel/collector.js +47 -18
  243. package/dist/internal/otel/config.d.ts +4 -0
  244. package/dist/internal/otel/config.d.ts.map +1 -1
  245. package/dist/internal/otel/config.js +20 -9
  246. package/dist/internal/otel/http.d.ts +1 -1
  247. package/dist/internal/otel/http.d.ts.map +1 -1
  248. package/dist/internal/otel/http.js +1 -1
  249. package/dist/internal/otel/runtime.d.ts +17 -14
  250. package/dist/internal/otel/runtime.d.ts.map +1 -1
  251. package/dist/internal/otel/runtime.js +181 -238
  252. package/dist/internal/package-inline-stdio.d.ts.map +1 -1
  253. package/dist/internal/package-inline-stdio.js +1 -0
  254. package/dist/internal/process-memory-telemetry.d.ts +1 -1
  255. package/dist/internal/process-memory-telemetry.d.ts.map +1 -1
  256. package/dist/internal/process-memory-telemetry.js +1 -1
  257. package/dist/internal/sdk-runner.d.ts.map +1 -1
  258. package/dist/internal/sdk-runner.js +22 -2
  259. package/dist/internal/server.d.ts.map +1 -1
  260. package/dist/internal/server.js +25 -13
  261. package/dist/internal/session-engine.d.ts +9 -1
  262. package/dist/internal/session-engine.d.ts.map +1 -1
  263. package/dist/internal/session-engine.js +31 -2
  264. package/dist/internal/slack-provision-client.d.ts +1 -0
  265. package/dist/internal/slack-provision-client.d.ts.map +1 -1
  266. package/dist/internal/slack-provision-client.js +1 -1
  267. package/dist/internal/store-api-protocol.d.ts +1 -1
  268. package/dist/internal/store-api-protocol.d.ts.map +1 -1
  269. package/dist/internal/store-api-protocol.js +1 -1
  270. package/dist/internal/update-check.d.ts +1 -1
  271. package/dist/internal/update-check.d.ts.map +1 -1
  272. package/dist/internal/update-check.js +1 -1
  273. package/dist/otel.d.ts +1 -2
  274. package/dist/otel.d.ts.map +1 -1
  275. package/dist/otel.js +0 -1
  276. package/dist/playground/assets/index-DKKdkF29.js +62 -0
  277. package/dist/playground/assets/index-DpKinTMs.css +1 -0
  278. package/dist/playground/index.html +2 -2
  279. package/dist/tools.d.ts +2 -2
  280. package/dist/tools.d.ts.map +1 -1
  281. package/dist/tools.js +1 -1
  282. package/dist/types.d.ts +1 -1
  283. package/dist/types.d.ts.map +1 -1
  284. package/docs/deployment.md +9 -4
  285. package/docs/guides/cloud-agents.md +1 -0
  286. package/docs/guides/migrate.md +46 -4
  287. package/docs/guides/opentelemetry.md +48 -2
  288. package/docs/reference/agent-config.md +0 -1
  289. package/docs/reference/cli.md +16 -5
  290. package/docs/reference/extensions.md +15 -9
  291. package/docs/reference/instructions.md +5 -1
  292. package/docs/templates/agentic-owners.md +55 -23
  293. package/package.json +17 -19
  294. package/skills/migrate-v2/SKILL.md +140 -11
  295. package/skills/otel/SKILL.md +17 -4
  296. package/dist/docs/assets/chunks/@localSearchIndexroot.DLNj_nNf.js +0 -1
  297. package/dist/docs/assets/chunks/channel.DRdmGkBC.js +0 -1
  298. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CAGM3Q8f.js +0 -1
  299. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CAGM3Q8f.js +0 -1
  300. package/dist/docs/assets/chunks/clone.DjA1k4gh.js +0 -1
  301. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CjwS--3R.js +0 -1
  302. package/dist/docs/assets/chunks/wardley-RL74JXVD.BtotXz_c.js +0 -162
  303. package/dist/docs/assets/guides_migrate.md.DZBL7dqT.js +0 -7
  304. package/dist/docs/assets/templates_agentic-owners.md.CvmABtia.js +0 -14
  305. package/dist/playground/assets/index-CzV_Cybi.css +0 -1
  306. package/dist/playground/assets/index-XXYKgdQn.js +0 -71
@@ -27,10 +27,13 @@ import ci from "@acme/ci-triage";
27
27
 
28
28
  export default ci({
29
29
  org: "acme",
30
- token: process.env.BUILDKITE_TOKEN,
30
+ token: () => process.env.BUILDKITE_TOKEN ?? "",
31
31
  });
32
32
  ```
33
33
 
34
+ Pass `token` as a function so a tool can call it. The function reads
35
+ `BUILDKITE_TOKEN` when the tool calls it.
36
+
34
37
  The extension validates its configuration while the project loads.
35
38
  Missing or mistyped settings fail `bdk validate` before a turn
36
39
  can call the contributed code.
@@ -115,14 +118,15 @@ import { cursorPlugin } from "@cursor/bdk/extensions";
115
118
  export default cursorPlugin({
116
119
  path: "plugins/notion-workspace",
117
120
  variables: {
118
- NOTION_TOKEN: process.env.NOTION_TOKEN,
121
+ NOTION_TOKEN: "${NOTION_TOKEN}",
119
122
  },
120
123
  });
121
124
  ```
122
125
 
123
126
  `path` is relative to the project root. `variables` fills placeholders
124
- declared by the plugin's MCP configuration; unresolved placeholders
125
- fail validation instead of mounting a partial server.
127
+ declared by the plugin's MCP configuration. Pass a `${NAME}` template.
128
+ The connection reads `NAME` when it opens. An unresolved placeholder
129
+ fails validation instead of mounting a partial server.
126
130
 
127
131
  Plugin rules and hooks are not mounted. Overlay a generated
128
132
  `mcp-connections/<server>.ts` file to replace or disable one plugin
@@ -172,10 +176,13 @@ export default defineExtension({
172
176
  description: "Investigate failing Buildkite jobs.",
173
177
  config: z.object({
174
178
  org: z.string(),
175
- token: z.string(),
179
+ token: z.function().args().returns(z.string()),
176
180
  logTailLines: z.number().int().positive().default(200),
177
181
  }),
178
- hosting: () => ({ egressDomains: ["api.buildkite.com"] }),
182
+ hosting: () => ({
183
+ egressDomains: ["api.buildkite.com"],
184
+ secretNames: ["BUILDKITE_TOKEN"],
185
+ }),
179
186
  });
180
187
  ```
181
188
 
@@ -188,9 +195,8 @@ prose assets beside it.
188
195
  from the environment. It receives the validated settings, and the
189
196
  mounting agent's `hosting.egressDomains` and `hosting.secretNames` gain
190
197
  whatever it returns, so a hosted deploy reaches Buildkite without the
191
- consumer listing `api.buildkite.com`. Leave out secrets that arrive
192
- through settings, such as `token` here; the consumer decides where that
193
- value comes from.
198
+ consumer listing `api.buildkite.com`. List `BUILDKITE_TOKEN` in
199
+ `secretNames`. Call `extension.config.token()` inside a tool.
194
200
 
195
201
  The [Project layout](./project-layout.md) owns each contribution's
196
202
  authoring contract. Keep extension instructions and tool descriptions
@@ -22,10 +22,14 @@ on every turn. A root agent requires them; a subagent may inline
22
22
  import { defineInstructions } from "@cursor/bdk";
23
23
 
24
24
  export default defineInstructions({
25
- markdown: `You are the on-call assistant for ${process.env.TEAM_NAME}.`,
25
+ markdown: "You are the on-call assistant for the payments team.",
26
26
  });
27
27
  ```
28
28
 
29
+ The `markdown` string is fixed when this file loads. Read a secret in
30
+ a handler, a tool, or a callback. See
31
+ [Add egress and secrets](../deployment.md#add-egress-and-secrets).
32
+
29
33
  ## Delivery
30
34
 
31
35
  Instructions land in the session workspace as `AGENTS.md`, and the
@@ -8,13 +8,13 @@ description: "Scaffold the agent, commit .agentic-owners policies, and let it ri
8
8
  This agent reviews every pull request in your repository. It risk-tiers
9
9
  the diff, requests the owning team or user as reviewers, and approves
10
10
  what your policy allows. Ownership rules live in
11
- `.agentic-owners/policy.yml` files committed at any depth of the repo;
12
- the closest policy to a changed file wins, and policies are always read
13
- from the PR's base ref so a PR cannot exempt itself.
11
+ `.agentic-owners/policy.yml` files committed at any depth of the repo.
12
+ The closest policy to a changed file wins, and policies are always read
13
+ from the PR's base ref, so a PR cannot exempt itself.
14
14
 
15
15
  ## Scaffold
16
16
 
17
- ```text
17
+ ```bash
18
18
  bdk init ./owners-agent --template agentic-owners
19
19
  ```
20
20
 
@@ -23,21 +23,23 @@ on PATH.
23
23
 
24
24
  ## Log in and run
25
25
 
26
- Set your repositories in `bot/lib/config.ts` (`repos: ["you/your-repo"]`),
26
+ Set your repositories in `bot/lib/config.ts` (`repos: ["acme/api"]`),
27
27
  then:
28
28
 
29
- ```text
29
+ ```bash
30
30
  cd owners-agent
31
31
  bdk login
32
32
  bdk dev
33
33
  ```
34
34
 
35
35
  PR events stream through your Cursor account. No webhook or GitHub App
36
- setup. Open a PR, or replay a real one deterministically (this also works
36
+ setup. The agent reviews a PR when it is opened, reopened, pushed to,
37
+ marked ready for review, or retargeted to another base. Draft PRs wait
38
+ until they are ready. Open a PR, or replay a real one (this also works
37
39
  with `repos` empty):
38
40
 
39
- ```text
40
- bdk github replay https://github.com/you/your-repo/pull/123 --dir .
41
+ ```bash
42
+ bdk github replay https://github.com/acme/api/pull/123 --dir .
41
43
  ```
42
44
 
43
45
  Deploy with `bdk deploy`.
@@ -49,37 +51,67 @@ low risk approve, medium and above hold with a comment. Route reviews by
49
51
  committing policies:
50
52
 
51
53
  ```yaml
52
- # .agentic-owners/policy.yml. Anywhere in the repo; closest wins.
53
- # paths are repo-root-relative globs, wherever the policy file lives.
54
+ # .agentic-owners/policy.yml at any depth; the closest policy wins.
54
55
  version: 1
55
56
  policies:
56
57
  - paths: ["docs/**"]
57
58
  always_approve: true
58
59
  - paths: ["src/api/**"]
59
- team: acme/platform # or user: alice
60
+ team: platform # bare slug in the repo's org; or acme/platform, or user: alice
60
61
  prompt: api-review.md # optional extra rubric, same directory
61
62
  - paths: ["src/billing/**"]
62
- user: alice
63
- human_review_required: true # the agent never approves; a person must
63
+ users: [alice, bob]
64
+ mode: hard # the agent never approves; a person must
64
65
  ```
65
66
 
66
- `self_review: true` lets a listed owner's own PRs clear their rule.
67
- `global_exclusions` in the root policy opts paths out entirely.
67
+ `paths` are globs relative to the directory that holds the
68
+ `.agentic-owners/` folder, so a root policy sees repo-relative paths and
69
+ `src/.agentic-owners/policy.yml` matches `api/**` against
70
+ `src/api/**`. Leading `../` segments reach a sibling tree. A path cannot
71
+ escape the repo.
72
+
73
+ | Key | Meaning |
74
+ | --- | --- |
75
+ | `paths` | Globs relative to the policy's directory. Required. |
76
+ | `team` / `teams` | Owner teams. A bare slug resolves in the repo's org. An `org/team` handle names a team directly. |
77
+ | `user` / `users` | Owner GitHub logins, without `@`. |
78
+ | `prompt` | Markdown filename in the same directory, added to the rubric for matching PRs. |
79
+ | `mode` | `advisory` (default): low risk approves. `hard`: a person must approve. `notify`: the rule never blocks and its owners are not requested. |
80
+ | `human_review_required` | `true` is the older spelling of `mode: hard`. |
81
+ | `self_review` | A listed `user:` owner's own PRs clear this rule. |
82
+ | `always_approve` | Satisfied at every risk tier. Cannot combine with owners, `prompt`, `mode`, `self_review`, or `human_review_required`. |
83
+
84
+ A rule without owners must set `always_approve: true`.
85
+ `global_exclusions` in the root policy opts paths out entirely. The
86
+ agent rejects `delegated_automations`: nothing in this template consumes
87
+ automation approvals.
68
88
 
69
89
  ## What one review does
70
90
 
71
91
  One model turn per PR head assesses the host-fetched diff against the
72
- base rubric plus any matched rule prompts, then records a verdict with
92
+ base rubric plus any matched rule prompts, then records a risk tier of
93
+ `very_low`, `low`, `medium`, `medium_high`, or `high` with
73
94
  `record_review`. The host recomputes the policy from trusted state and
74
95
  applies the deterministic decision:
75
96
 
76
- - **Approve** when the tier is low and no matched rule demands a human,
77
- bound to the head SHA.
97
+ - **Approve** when every matched rule is `always_approve` or `notify`,
98
+ or when the tier is very low or low and every matched `hard` rule is
99
+ cleared by an owner-author with `self_review`. At medium and above,
100
+ the agent approves only when the author's `self_review` covers every
101
+ rule that can require review.
78
102
  - **Request reviewers** otherwise: the policy owners (max 2, never the
79
103
  author), plus one status comment the agent keeps updated in place.
80
104
 
105
+ An approval binds to the head SHA, and a later hold dismisses the
106
+ agent's earlier approvals. The agent also holds when the PR edits
107
+ `.agentic-owners/` or `CODEOWNERS`, when the diff is empty or truncated,
108
+ or when GitHub capped the changed-file list. `self_review` never clears
109
+ a governance edit.
110
+
81
111
  The model never writes to GitHub. A broken policy file fails closed with
82
- a comment listing the validation issues.
112
+ a comment listing the validation issues. Team membership is not
113
+ resolved, because repo-scoped credentials cannot read org teams, so
114
+ `self_review` applies to `user:` owners only.
83
115
 
84
116
  ## Rubric
85
117
 
@@ -91,9 +123,9 @@ next to the policy that names them. The next review reads both.
91
123
 
92
124
  Use the three smoke reviews as a local exercise:
93
125
 
94
- ```text
126
+ ```bash
95
127
  bdk eval
96
128
  ```
97
129
 
98
- Three smoke reviews (docs-only, auth deletion, prompt injection). Eval
99
- sessions skip GitHub writes.
130
+ The cases are a docs-only change, an auth deletion, and a prompt
131
+ injection. Eval sessions skip GitHub writes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cursor/bdk",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "description": "Build, test, and deploy BDK bots and agents as code on Cursor's agent harness.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
@@ -329,17 +329,14 @@
329
329
  "ms": "^2.1.3",
330
330
  "proper-lockfile": "^4.1.2",
331
331
  "slackify-markdown": "^5.0.0",
332
- "tsx": "^4.0.0",
333
- "zod": "^3.25.0",
334
- "zod-to-json-schema": "^3.24.5"
332
+ "tsx": "4.23.15",
333
+ "zod-to-json-schema": "^3.25.2"
334
+ },
335
+ "peerDependencies": {
336
+ "zod": "^3.25.0 || ^4.0.0"
335
337
  },
336
338
  "devDependencies": {
337
339
  "@braintree/sanitize-url": "7.1.2",
338
- "@cursor/sdk-darwin-arm64": "1.0.37",
339
- "@cursor/sdk-darwin-x64": "1.0.37",
340
- "@cursor/sdk-linux-arm64": "1.0.37",
341
- "@cursor/sdk-linux-x64": "1.0.37",
342
- "@cursor/sdk-win32-x64": "1.0.37",
343
340
  "@stylexswc/rs-compiler": "^0.18.0",
344
341
  "@tanstack/react-virtual": "3.13.23",
345
342
  "@types/js-yaml": "4.0.9",
@@ -347,33 +344,34 @@
347
344
  "@types/node": "22.14.1",
348
345
  "@types/pg": "^8.16.0",
349
346
  "@types/proper-lockfile": "^4.1.4",
350
- "@types/react": "^19.0.0",
351
- "@types/react-dom": "^19.0.0",
347
+ "@types/react": "19.3.0",
348
+ "@types/react-dom": "19.3.0",
352
349
  "@typescript/native": "npm:typescript@^7.0.2",
353
- "@vitejs/plugin-react": "^5.1.2",
350
+ "@vitejs/plugin-react": "6.1.2",
354
351
  "cytoscape": "3.33.3",
355
352
  "cytoscape-cose-bilkent": "4.1.0",
356
353
  "dayjs": "1.11.20",
357
354
  "mermaid": "^11.14.0",
358
355
  "pg": "^8.18.0",
359
356
  "pretty-ms": "^9.2.0",
360
- "react": "^19.2.1",
361
- "react-dom": "^19.2.1",
357
+ "react": "19.3.0",
358
+ "react-dom": "19.3.0",
362
359
  "react-markdown": "^10.1.0",
363
360
  "rehype-highlight": "^7.0.2",
364
361
  "remark-gfm": "^4.0.1",
365
362
  "typescript": "npm:@typescript/typescript6@^6.0.2",
366
- "vite": "^7.3.0",
363
+ "vite": "8.3.1",
367
364
  "vitepress": "1.6.4",
368
365
  "vitepress-plugin-mermaid": "^2.0.17",
369
- "vitest": "^4.0.18",
366
+ "vitest": "5.0.3",
370
367
  "yaml": "^2.4.2",
368
+ "zod": "^3.25.0",
371
369
  "zustand": "^5.0.9",
372
370
  "@anysphere/agent-exec": "1.0.0",
373
371
  "@anysphere/context": "1.0.0",
374
- "@anysphere/ui": "1.0.0",
375
372
  "@anysphere/agent-store-sync": "1.0.0",
376
- "@anysphere/proto": "1.0.0"
373
+ "@anysphere/proto": "1.0.0",
374
+ "@anysphere/ui": "1.0.0"
377
375
  },
378
376
  "scripts": {
379
377
  "build": "tsc -p tsconfig.build.json && node scripts/bundle-publish-shims.mjs && node scripts/copy-extension-assets.mjs && pnpm run build:playground && pnpm run docs:build",
@@ -396,4 +394,4 @@
396
394
  "smoke-publish": "node scripts/smoke-publish-artifact.mjs",
397
395
  "publish-check": "pnpm run build && pnpm run verify-publish && pnpm run smoke-publish"
398
396
  }
399
- }
397
+ }
@@ -23,7 +23,21 @@ Migrate when any of these is true:
23
23
  - `bdk deployment <slug>` for the hosted copy does not print
24
24
  `architecture: v2`.
25
25
 
26
- Stop when none is true.
26
+ Stop when none is true. Your final message must start with
27
+ `Nothing to migrate.` and must name the checks you ran. Open no pull
28
+ request.
29
+
30
+ `bdk migrate` checks `--dir` before it starts an agent. It starts an
31
+ agent when it finds any of these: an `@cursor/july` dependency or
32
+ import, `architecture: "v1"`, `bot/storage.ts` or `agent/storage.ts`,
33
+ `runtime: "grokbot"`, a literal or `() => process.env` SCM credential,
34
+ `continuation: ".../v1"`, an anonymous reminder `run` or function
35
+ `until`, or a `defineConnection` whose URL comes from a `*_MCP_URL`
36
+ secret. When none of those is present it prints `Nothing to migrate.`
37
+ and exits. When it cannot read a file, it starts the agent. It does
38
+ not run `bdk deployment`. A hosted copy can still be on v1 after the
39
+ source has moved. Check with `bdk deployment <slug>`, and deploy when
40
+ that output does not show `architecture: v2`.
27
41
 
28
42
  ## Know what changes
29
43
 
@@ -66,12 +80,14 @@ ends. That model changes code in three places:
66
80
  | Slack tool-approval buttons on Cursor hosting | Not supported yet |
67
81
  | `bdk mcp oauth --store` for host MCP OAuth | Not supported. Connect Cursor-account MCP servers from **Deployed Agents** in the dashboard. |
68
82
  | Session, tool, and MCP APIs on the deployment URL | Not reachable |
83
+ | Another BDK agent reached through a deployment URL secret | Not supported. Declare `defineConnection({ agent: "<slug>" })`. Both agents must be team-owned and deployed on `@cursor/bdk` 0.2.18 or newer. |
69
84
  | `--prod` with `chat`, `resume`, `call`, `skill`, `sessions`, `cost`, or `mcp` | Not supported. Use `run --prod`, `logs --prod`, `session --prod`, and `playground --prod`. |
70
85
  | v1 sessions, KV, and files | Not carried over. v2 starts empty, and deleting v1 deletes them. |
71
86
 
72
87
  The steps below rewrite `defineStorage`, inline reminders, SCM channel
73
- credentials, and secret reads. Stop and ask before migrating an agent
74
- that depends on Slack tool-approval buttons, `mcp oauth --store`, or an
88
+ credentials, secret reads, and peer calls that use a URL secret. Stop and
89
+ ask before migrating an agent that depends on Slack tool-approval buttons,
90
+ `mcp oauth --store`, or an
75
91
  HTTP route whose caller reads the response body. Name the row and the
76
92
  file that uses it.
77
93
 
@@ -177,9 +193,74 @@ still loads.
177
193
 
178
194
  7. **Move secret reads.** Replace module-scope `process.env.NAME` reads
179
195
  with reads inside the function that uses them. Give MCP connections a
180
- `${NAME}` header or env template instead.
196
+ `${NAME}` header or env template instead. A URL that points at another
197
+ BDK agent's deployment is not one of those secrets. Step 8 replaces
198
+ that connection, including a URL you templated here.
199
+
200
+ 8. **Rewrite peer calls that use a URL secret.** Do this in the migration
201
+ pull request. The deployment URL does not serve MCP, so a connection
202
+ left on that URL fails after deploy.
203
+
204
+ Treat the call as a peer when its URL comes from a `*_MCP_URL` secret
205
+ or a similar name, a `${NAME}` template, `process.env.NAME`, or a
206
+ string built from a deployment URL or slug, and the target is another
207
+ BDK agent. Leave a third-party MCP server as a URL connection and
208
+ apply step 7 to its secrets.
209
+
210
+ Use a slug only when the repo states it: the URL path, a `--slug`
211
+ value, a sibling directory that deploy would use as the slug, or a
212
+ comment that names the deployment. A secret name is a hint. Use
213
+ `BUILDER_MCP_URL` as `builder` only when something else in the repo
214
+ confirms that slug. When nothing confirms it, keep the URL connection
215
+ and add a TODO that names the secret and asks for the slug. Name that
216
+ TODO in the pull request body.
181
217
 
182
- 8. **Stop answering from HTTP routes.** A custom route that returned
218
+ ```ts
219
+ // before (v1), agent/mcp-connections/builder.ts
220
+ import { defineConnection } from "@cursor/bdk/connections";
221
+
222
+ export default defineConnection({
223
+ url: process.env.BUILDER_MCP_URL,
224
+ headers: { authorization: `Bearer ${process.env.BUILDER_TOKEN}` },
225
+ });
226
+
227
+ // after (v2)
228
+ import { defineConnection } from "@cursor/bdk/connections";
229
+
230
+ export default defineConnection({
231
+ agent: "builder",
232
+ description: "Ask the builder agent to handle this work.",
233
+ });
234
+ ```
235
+
236
+ `agent` is the peer's lowercase deployment slug. Keep an existing
237
+ connection file in place. When the project has no connection file,
238
+ add `bot/mcp-connections/<name>.ts`, or
239
+ `agent/mcp-connections/<name>.ts` when the project root is `agent/`.
240
+ Use `host-connections/` only when host code calls the peer and the
241
+ model must not see it. The filename is the connection name.
242
+
243
+ Hosting authenticates the peer call. Remove the URL, its headers, and
244
+ any token this call was the only reader of. Point host code that
245
+ called the deployment URL at
246
+ `ctx.host.mcp.callTool("<name>", "ask", { message })`. The peer
247
+ project needs no matching file. Do not edit a peer that sits outside
248
+ this folder.
249
+
250
+ Remove the unused URL secret from code and from `hosting.secretNames`
251
+ on `defineAgent`, and from an extension `hosting` block that declares
252
+ it. Leave every secret something else still reads.
253
+
254
+ Do not change deployment secrets, and do not run `bdk secrets unset`.
255
+ In the pull request body, list each secret this step stopped using,
256
+ with the command `bdk secrets unset <slug> NAME`, so the user can
257
+ unset it after both agents are deployed.
258
+
259
+ Both agents must be team-owned and deployed with `@cursor/bdk` 0.2.18
260
+ or newer before the connection resolves. This pull request does not
261
+ deploy them.
262
+
263
+ 9. **Stop answering from HTTP routes.** A custom route that returned
183
264
  computed data must deliver it another way, such as a callback URL or a
184
265
  tool the turn calls. Return `new Response(null, { status: 202 })` so
185
266
  local runs match the hosted response.
@@ -206,14 +287,29 @@ Run the project's own typecheck and tests.
206
287
  ## Open the pull request
207
288
 
208
289
  Describe each removed or changed behavior, each unsupported row the
209
- agent touched, and the deploy steps. Do not deploy from the pull request
210
- branch.
290
+ agent touched, and the deploy steps. For each peer URL you rewrote, name
291
+ the slug and the connection file. List every secret name the rewrite
292
+ left unused, and the `bdk secrets unset <slug> NAME` command for it.
293
+ Name each TODO whose slug you could not determine. Do not deploy from
294
+ the pull request branch, and do not change deployment secrets.
295
+
296
+ Copy this post-merge checklist into the pull request body. One
297
+ `bdk deploy --dir <agent-folder>` per agent. Do not use `bdk deploy --all`.
298
+ Then `bdk slack create --prod --dir <agent-folder> [--team <team-id>]`
299
+ for each agent that uses Slack. Then `bdk secrets unset <slug> NAME` for
300
+ each unused peer URL secret, and `bdk secrets list <slug>` plus
301
+ `bdk secrets set <slug> NAME` when the slug is new. Do not tell the user
302
+ to deploy again after Slack setup or after `bdk secrets set`. The server
303
+ redeploys after Slack setup, and a secret is injected on the next
304
+ request.
211
305
 
212
306
  ## Deploy after merge
213
307
 
214
308
  Deploy from a pushed ref. `bdk deploy` reads Git and never uploads the
215
309
  working tree.
216
310
 
311
+ When the folder contains one agent:
312
+
217
313
  ```bash
218
314
  bdk login
219
315
  bdk validate --dir .
@@ -222,6 +318,31 @@ bdk deploy --dir . --slug <existing-slug> \
222
318
  --allow-domain <domain>
223
319
  ```
224
320
 
321
+ When the folder contains more than one agent, deploy each agent alone.
322
+ Run the command one time for each agent folder. A `bdk deploy` on the
323
+ parent folder prints those commands and does not deploy. Do not run
324
+ `bdk deploy --all`. Repeat `bdk slack create --prod` for each agent
325
+ folder too.
326
+ The app slug is the folder name, so that name must match the deployed
327
+ slug.
328
+
329
+ ```bash
330
+ bdk deploy --dir <agent-folder> --slug <that-agent-slug> \
331
+ --cursor-events-repo <owner/repo> \
332
+ --allow-domain <domain>
333
+ ```
334
+
335
+ When this migration declares `defineConnection({ agent: "<slug>" })`,
336
+ deploy the caller and the peer. Both deployments must be team-owned and
337
+ must run `@cursor/bdk` 0.2.18 or newer. The connection file is already
338
+ in the merged source. The caller reaches the peer after the peer
339
+ deployment is running. The peer needs no matching file. After both
340
+ deploys are running, unset each URL secret the pull request lists:
341
+
342
+ ```bash
343
+ bdk secrets unset <slug> NAME
344
+ ```
345
+
225
346
  Pass every `--cursor-events-repo` and `--allow-domain` value the v1
226
347
  deployment used. Domains already in `hosting.egressDomains` need no
227
348
  flag. Print only those two fields, because the full output holds
@@ -252,10 +373,18 @@ After the deploy is running:
252
373
 
253
374
  - Store the alias token the deploy prints. Point every webhook sender
254
375
  and HTTP caller at the new alias URL.
255
- - For Slack, run `bdk slack create --prod --dir .`, then deploy again so
256
- the deployment binds the workspace. The new app is a different bot, so
257
- invite it to the channels the old one joined. The copied v1 Slack
258
- secrets go unused.
376
+ - For Slack, log in as a person. A team service-account key cannot
377
+ create the app. Run `bdk slack create --prod --dir <agent-folder>`
378
+ once per agent (`--team <team-id>` selects the Cursor team that owns
379
+ the deployment). The server redeploys by itself. Do not deploy again
380
+ for Slack. The new app is a different bot. Uninstall the old Slack app
381
+ and invite the new bot to the channels the old one joined. The copied
382
+ v1 Slack secrets go unused.
383
+ - For secrets, a same-slug deploy copies the v1 secrets. A new slug
384
+ needs `bdk secrets set <slug> NAME`. Check with
385
+ `bdk secrets list <slug> [--team <team-id>]`. `deploy` warns when a
386
+ declared secret is unset. A secret is injected on the next request.
387
+ Do not deploy again after `bdk secrets set`.
259
388
  - Reconnect Cursor-account MCP servers from **Deployed Agents** in the
260
389
  dashboard.
261
390
  - Start a turn with `bdk run --prod --slug <slug> --message "..."`. It
@@ -22,10 +22,23 @@ Public surface (use one of these):
22
22
  2. `serve(dir, { otel: { … } })`. `otel: false` disables env and
23
23
  authored config.
24
24
 
25
- `defineOtel` / `bot/otel.ts` is factory-only
26
- (`@cursor/bdk/internal/otel`). Do not import that path from a
27
- customer agent. Hosted secrets can arrive after startup; env and
28
- `serve({ otel })` are the supported public late-bind.
25
+ `bot/otel.ts` is factory-only. Import `defineOtel` from
26
+ `@cursor/bdk/internal/otel` only in a Cursor factory agent.
27
+ A customer agent uses the environment variables above.
28
+
29
+ Hosted agents:
30
+
31
+ - Set `OTEL_EXPORTER_OTLP_ENDPOINT` and
32
+ `OTEL_EXPORTER_OTLP_HEADERS` with `bdk secrets set`. Add the
33
+ collector host to `hosting.egressDomains`.
34
+ - Header values are URL-encoded (`Authorization=Basic%20...`).
35
+ - A new header from `bdk secrets set` applies on the next export.
36
+ You do not redeploy for a token change.
37
+ - BDK logs an error when an exporter host is not in
38
+ `hosting.egressDomains`.
39
+ - Spans and metrics from before the first request are not exported.
40
+ - If the OpenTelemetry config fails, BDK logs the error and the
41
+ request still completes.
29
42
 
30
43
  | Signal | Default |
31
44
  | --- | --- |