@cursor/bdk 0.2.13 → 0.2.15

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 (322) hide show
  1. package/AGENTS.md +51 -52
  2. package/README.md +1 -1
  3. package/dist/bin/agent-sdk.js +0 -0
  4. package/dist/bin/agent-serve.js +0 -0
  5. package/dist/channels/slack/attachments.d.ts +2 -0
  6. package/dist/channels/slack/attachments.d.ts.map +1 -1
  7. package/dist/channels/slack/attachments.js +17 -5
  8. package/dist/channels/slack/channel-watch.d.ts +4 -2
  9. package/dist/channels/slack/channel-watch.d.ts.map +1 -1
  10. package/dist/channels/slack/channel-watch.js +4 -2
  11. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  12. package/dist/channels/slack/slack-channel.js +4 -2
  13. package/dist/channels/slack/types.d.ts +6 -4
  14. package/dist/channels/slack/types.d.ts.map +1 -1
  15. package/dist/connections.d.ts +29 -0
  16. package/dist/connections.d.ts.map +1 -1
  17. package/dist/connections.js +54 -0
  18. package/dist/docs/404.html +2 -2
  19. package/dist/docs/assets/{app.CaLG1pPt.js → app.CRMxF0qX.js} +4 -4
  20. package/dist/docs/assets/{building-with-agents.md.Df87rAe1.js → building-with-agents.md.Bi9CQ-bR.js} +3 -3
  21. package/dist/docs/assets/{building-with-agents.md.Df87rAe1.lean.js → building-with-agents.md.Bi9CQ-bR.lean.js} +1 -1
  22. package/dist/docs/assets/chunks/@localSearchIndexroot.BZwvb2LN.js +1 -0
  23. package/dist/docs/assets/chunks/{VPLocalSearchBox.YsP_2wqD.js → VPLocalSearchBox.C4BiQe53.js} +1 -1
  24. package/dist/docs/assets/chunks/{arc.C2j9hR7c.js → arc.D1TA2Mxn.js} +1 -1
  25. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.C5qkGp7y.js → architectureDiagram-Q4EWVU46.CA-hBJCN.js} +1 -1
  26. package/dist/docs/assets/chunks/{baseUniq.U6GgTHOD.js → baseUniq.CzsSgiab.js} +1 -1
  27. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.D51mJop2.js → blockDiagram-DXYQGD6D.sxrH_f0l.js} +1 -1
  28. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.w1d6QxV7.js → c4Diagram-AHTNJAMY.D_Z3mqAl.js} +1 -1
  29. package/dist/docs/assets/chunks/channel.D7DtboxW.js +1 -0
  30. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.B_A815un.js → chunk-4BX2VUAB.BS6_uTUf.js} +1 -1
  31. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.DMrm-ZCb.js → chunk-4TB4RGXK.D-URAeTU.js} +1 -1
  32. package/dist/docs/assets/chunks/{chunk-55IACEB6.8qw6Xdal.js → chunk-55IACEB6.b4SZc5kO.js} +1 -1
  33. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.Cq_nHODn.js → chunk-EDXVE4YY.DLKEEDkN.js} +1 -1
  34. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.B67ohCYn.js → chunk-FMBD7UC4.3SyQHgpY.js} +1 -1
  35. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.Bo8rQI8F.js → chunk-OYMX7WX6.DBKKaFeS.js} +1 -1
  36. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BERUMfE9.js → chunk-QZHKN3VN.BhCYeR7H.js} +1 -1
  37. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.DWG2tXIX.js → chunk-YZCP3GAM.Cpg0VgI7.js} +1 -1
  38. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.irslOV8B.js +1 -0
  39. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.irslOV8B.js +1 -0
  40. package/dist/docs/assets/chunks/clone.DosLeDYL.js +1 -0
  41. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.tezXBs9b.js → cose-bilkent-S5V4N54A.4q0YNZN6.js} +1 -1
  42. package/dist/docs/assets/chunks/{dagre-KV5264BT.aSbEUwT7.js → dagre-KV5264BT.Bk_CcQPr.js} +1 -1
  43. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.vnT6aJ57.js → diagram-5BDNPKRD.CgreoM_Z.js} +1 -1
  44. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.hGYdrDa2.js → diagram-G4DWMVQ6.DlZGpm6W.js} +1 -1
  45. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.CmdSUP6L.js → diagram-MMDJMWI5.BxtXxgIR.js} +1 -1
  46. package/dist/docs/assets/chunks/{diagram-TYMM5635.BbAnLEBB.js → diagram-TYMM5635.DSzlJp2D.js} +1 -1
  47. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.H40W4HWE.js → erDiagram-SMLLAGMA.BN1YUmEV.js} +1 -1
  48. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BFMtUSv-.js → flowDiagram-DWJPFMVM.B61NGNYu.js} +1 -1
  49. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.CbYiu7Dt.js → ganttDiagram-T4ZO3ILL.DR-tto3M.js} +1 -1
  50. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.Cyc5mzZD.js → gitGraphDiagram-UUTBAWPF.CBPs2W_2.js} +1 -1
  51. package/dist/docs/assets/chunks/{graph.BRptDG1H.js → graph.DmlaqzCE.js} +1 -1
  52. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.Bz6KCA3a.js → infoDiagram-42DDH7IO.obPv-fFg.js} +1 -1
  53. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DDJ_7_Fq.js → ishikawaDiagram-UXIWVN3A.CXHTUcM3.js} +1 -1
  54. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.D0t_ltlb.js → journeyDiagram-VCZTEJTY.BoVHerYZ.js} +1 -1
  55. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.DyyNsMfi.js → kanban-definition-6JOO6SKY.CfYmPHZg.js} +1 -1
  56. package/dist/docs/assets/chunks/{layout.Cbxq-Rhp.js → layout.621UdAhB.js} +1 -1
  57. package/dist/docs/assets/chunks/{linear.DxGYL0MP.js → linear.Cz_zRKjr.js} +1 -1
  58. package/dist/docs/assets/chunks/{min.DA5KL8wu.js → min.ON4GjCH7.js} +1 -1
  59. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.Bc72Utls.js → mindmap-definition-QFDTVHPH.DLPMLJlv.js} +1 -1
  60. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.BtpHnIB_.js → pieDiagram-DEJITSTG.BFp11AYt.js} +1 -1
  61. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.Cx4oCSRR.js → quadrantDiagram-34T5L4WZ.ChX7xo6B.js} +1 -1
  62. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.BC0hXWlW.js → requirementDiagram-MS252O5E.DbKtHG_Q.js} +1 -1
  63. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.Dg8T1SEp.js → sankeyDiagram-XADWPNL6.Spw8tv-7.js} +1 -1
  64. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.CWSdHYAF.js → sequenceDiagram-FGHM5R23.BYso9LlE.js} +1 -1
  65. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.0MVPRI28.js → stateDiagram-FHFEXIEX.D8l54jqW.js} +1 -1
  66. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CAYMmzGj.js +1 -0
  67. package/dist/docs/assets/chunks/{theme.DO1avLBn.js → theme.m_Ethbkv.js} +2 -2
  68. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.BuRinAVi.js → timeline-definition-GMOUNBTQ.BLdhhyy9.js} +1 -1
  69. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DXf0PCoJ.js → vennDiagram-DHZGUBPP.CyGT2F_P.js} +1 -1
  70. package/dist/docs/assets/chunks/wardley-RL74JXVD.C5JJS3bh.js +162 -0
  71. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.T4ThngYV.js → wardleyDiagram-NUSXRM2D.p_Sz9p1i.js} +1 -1
  72. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.b4pZF3D5.js → xychartDiagram-5P7HB3ND.DtXsNUaf.js} +1 -1
  73. package/dist/docs/assets/deployment.md.hKKN9I4c.js +31 -0
  74. package/dist/docs/assets/{deployment.md.BYuEcDBv.lean.js → deployment.md.hKKN9I4c.lean.js} +1 -1
  75. package/dist/docs/assets/{evals.md.C851kViu.js → evals.md.CHR34K1Y.js} +3 -7
  76. package/dist/docs/assets/{evals.md.C851kViu.lean.js → evals.md.CHR34K1Y.lean.js} +1 -1
  77. package/dist/docs/assets/guides_cloud-agents.md.CBK7W0-O.js +9 -0
  78. package/dist/docs/assets/guides_cloud-agents.md.CBK7W0-O.lean.js +1 -0
  79. package/dist/docs/assets/guides_grokbot-agents.md.BwAykJ7U.js +15 -0
  80. package/dist/docs/assets/{guides_grokbot-agents.md.tD1smFhU.lean.js → guides_grokbot-agents.md.BwAykJ7U.lean.js} +1 -1
  81. package/dist/docs/assets/{guides_hooks.md.5Ce3NXxZ.js → guides_hooks.md.B_bKG1oA.js} +1 -1
  82. package/dist/docs/assets/{guides_improve.md.CRrYq22s.js → guides_improve.md.CZKVt1cT.js} +2 -3
  83. package/dist/docs/assets/{guides_improve.md.CRrYq22s.lean.js → guides_improve.md.CZKVt1cT.lean.js} +1 -1
  84. package/dist/docs/assets/{guides_mcp-oauth.md.DR3zhC9r.js → guides_mcp-oauth.md.BM_eFC0L.js} +3 -15
  85. package/dist/docs/assets/guides_mcp-oauth.md.BM_eFC0L.lean.js +1 -0
  86. package/dist/docs/assets/{guides_webhooks.md.BBvAm_VF.js → guides_webhooks.md.Cpdc3BDX.js} +13 -12
  87. package/dist/docs/assets/{guides_webhooks.md.BBvAm_VF.lean.js → guides_webhooks.md.Cpdc3BDX.lean.js} +1 -1
  88. package/dist/docs/assets/{index.md.Dxxr7pFa.js → index.md.BIBHIQtU.js} +1 -1
  89. package/dist/docs/assets/{quickstart.md.BK5gjHM2.js → quickstart.md.CduLGBAB.js} +1 -1
  90. package/dist/docs/assets/reference_channels.md.DYg0CLud.js +22 -0
  91. package/dist/docs/assets/{reference_channels.md.LbNIJBwd.lean.js → reference_channels.md.DYg0CLud.lean.js} +1 -1
  92. package/dist/docs/assets/{reference_cli.md.dYCAL2lB.js → reference_cli.md.BYNIHwbi.js} +15 -12
  93. package/dist/docs/assets/{reference_cli.md.dYCAL2lB.lean.js → reference_cli.md.BYNIHwbi.lean.js} +1 -1
  94. package/dist/docs/assets/{reference_connections.md.DLrgAd5f.js → reference_connections.md.CxbLpaaP.js} +4 -5
  95. package/dist/docs/assets/{reference_connections.md.DLrgAd5f.lean.js → reference_connections.md.CxbLpaaP.lean.js} +1 -1
  96. package/dist/docs/assets/{reference_evals.md.D5i8PuXJ.js → reference_evals.md.if--BLd0.js} +1 -1
  97. package/dist/docs/assets/{reference_hooks.md.B-eGa2km.js → reference_hooks.md.DbJC8mcZ.js} +1 -1
  98. package/dist/docs/assets/reference_http-api.md.CrqhTv6S.js +11 -0
  99. package/dist/docs/assets/{reference_http-api.md.DbFNOubV.lean.js → reference_http-api.md.CrqhTv6S.lean.js} +1 -1
  100. package/dist/docs/assets/reference_playground.md.q4MI-0td.js +1 -0
  101. package/dist/docs/assets/reference_playground.md.q4MI-0td.lean.js +1 -0
  102. package/dist/docs/assets/{reference_schedules.md.BuJ8fgMa.js → reference_schedules.md.03Ryy9ca.js} +5 -5
  103. package/dist/docs/assets/{reference_schedules.md.BuJ8fgMa.lean.js → reference_schedules.md.03Ryy9ca.lean.js} +1 -1
  104. package/dist/docs/assets/reference_sessions.md.C_uzIWuy.js +1 -0
  105. package/dist/docs/assets/{reference_skills.md.C0guGcH0.js → reference_skills.md.Ckddg6KX.js} +4 -4
  106. package/dist/docs/assets/{reference_tools.md.DzIY9JzY.js → reference_tools.md.08XR7lIl.js} +3 -14
  107. package/dist/docs/assets/reference_tools.md.08XR7lIl.lean.js +1 -0
  108. package/dist/docs/assets/{templates_grokbot-agents.md.2sydjFiO.js → templates_grokbot-agents.md.DgpPEs7B.js} +1 -1
  109. package/dist/docs/assets/troubleshooting.md.PCafNCb5.js +1 -0
  110. package/dist/docs/assets/{troubleshooting.md.x-GBa7wN.lean.js → troubleshooting.md.PCafNCb5.lean.js} +1 -1
  111. package/dist/docs/building-with-agents.html +37 -37
  112. package/dist/docs/building-with-agents.md +5 -5
  113. package/dist/docs/deployment.html +43 -41
  114. package/dist/docs/deployment.md +70 -33
  115. package/dist/docs/evals.html +38 -42
  116. package/dist/docs/evals.md +1 -16
  117. package/dist/docs/guides/agent-to-agent.html +35 -35
  118. package/dist/docs/guides/bitbucket.html +35 -35
  119. package/dist/docs/guides/cloud-agents.html +38 -39
  120. package/dist/docs/guides/cloud-agents.md +2 -8
  121. package/dist/docs/guides/convert-automation.html +35 -35
  122. package/dist/docs/guides/github.html +35 -35
  123. package/dist/docs/guides/gitlab.html +35 -35
  124. package/dist/docs/guides/grokbot-agents.html +37 -38
  125. package/dist/docs/guides/grokbot-agents.md +9 -13
  126. package/dist/docs/guides/hooks.html +37 -37
  127. package/dist/docs/guides/hooks.md +0 -1
  128. package/dist/docs/guides/improve.html +37 -38
  129. package/dist/docs/guides/improve.md +4 -6
  130. package/dist/docs/guides/jev.html +35 -35
  131. package/dist/docs/guides/mcp-oauth.html +39 -51
  132. package/dist/docs/guides/mcp-oauth.md +17 -40
  133. package/dist/docs/guides/migrate.html +35 -35
  134. package/dist/docs/guides/opentelemetry.html +35 -35
  135. package/dist/docs/guides/slack.html +35 -35
  136. package/dist/docs/guides/webhooks.html +47 -46
  137. package/dist/docs/guides/webhooks.md +35 -18
  138. package/dist/docs/hashmap.json +1 -1
  139. package/dist/docs/hillclimbing.html +35 -35
  140. package/dist/docs/index.html +36 -36
  141. package/dist/docs/index.md +1 -1
  142. package/dist/docs/llms-full.txt +347 -269
  143. package/dist/docs/llms.txt +4 -4
  144. package/dist/docs/quickstart.html +37 -37
  145. package/dist/docs/quickstart.md +2 -2
  146. package/dist/docs/reference/agent-config.html +35 -35
  147. package/dist/docs/reference/artifacts.html +35 -35
  148. package/dist/docs/reference/channels.html +42 -43
  149. package/dist/docs/reference/channels.md +29 -13
  150. package/dist/docs/reference/cli.html +49 -46
  151. package/dist/docs/reference/cli.md +113 -40
  152. package/dist/docs/reference/connections.html +39 -40
  153. package/dist/docs/reference/connections.md +6 -5
  154. package/dist/docs/reference/evals.html +37 -37
  155. package/dist/docs/reference/evals.md +2 -4
  156. package/dist/docs/reference/extensions.html +35 -35
  157. package/dist/docs/reference/hooks.html +37 -37
  158. package/dist/docs/reference/hooks.md +0 -1
  159. package/dist/docs/reference/http-api.html +38 -38
  160. package/dist/docs/reference/http-api.md +7 -17
  161. package/dist/docs/reference/instructions.html +35 -35
  162. package/dist/docs/reference/playground.html +37 -37
  163. package/dist/docs/reference/playground.md +1 -4
  164. package/dist/docs/reference/project-layout.html +35 -35
  165. package/dist/docs/reference/prompt.html +35 -35
  166. package/dist/docs/reference/schedules.html +39 -39
  167. package/dist/docs/reference/schedules.md +26 -3
  168. package/dist/docs/reference/sessions.html +36 -36
  169. package/dist/docs/reference/sessions.md +1 -2
  170. package/dist/docs/reference/skills.html +39 -39
  171. package/dist/docs/reference/skills.md +1 -1
  172. package/dist/docs/reference/subagents.html +35 -35
  173. package/dist/docs/reference/tools.html +39 -50
  174. package/dist/docs/reference/tools.md +2 -28
  175. package/dist/docs/templates/agentic-owners.html +35 -35
  176. package/dist/docs/templates/grokbot-agents.html +37 -37
  177. package/dist/docs/templates/grokbot-agents.md +1 -1
  178. package/dist/docs/templates/security-reviewer.html +35 -35
  179. package/dist/docs/templates/thermo-quality-review.html +35 -35
  180. package/dist/docs/templates/thermo-review.html +35 -35
  181. package/dist/docs/templates/triage.html +35 -35
  182. package/dist/docs/troubleshooting.html +36 -36
  183. package/dist/docs/troubleshooting.md +12 -7
  184. package/dist/executors.d.ts +11 -0
  185. package/dist/executors.d.ts.map +1 -0
  186. package/dist/executors.js +21 -0
  187. package/dist/extensions/cursor-cloud-agents/extension.d.ts +6 -2
  188. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  189. package/dist/extensions/cursor-cloud-agents/extension.js +5 -1
  190. package/dist/extensions/cursor-cloud-agents/lib/channels.d.ts.map +1 -1
  191. package/dist/extensions/cursor-cloud-agents/lib/channels.js +5 -1
  192. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +21 -4
  193. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -1
  194. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +26 -5
  195. package/dist/files.d.ts +1 -0
  196. package/dist/files.d.ts.map +1 -1
  197. package/dist/files.js +3 -1
  198. package/dist/filesystem.d.ts +10 -0
  199. package/dist/filesystem.d.ts.map +1 -1
  200. package/dist/filesystem.js +128 -0
  201. package/dist/index.d.ts +1 -1
  202. package/dist/index.d.ts.map +1 -1
  203. package/dist/index.js +1 -1
  204. package/dist/internal/cli-deploy.d.ts.map +1 -1
  205. package/dist/internal/cli-deploy.js +17 -0
  206. package/dist/internal/continuation-identity.js +1 -1
  207. package/dist/internal/conversation-mirror.d.ts +11 -0
  208. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  209. package/dist/internal/conversation-mirror.js +198 -125
  210. package/dist/internal/conversation-pack.d.ts +29 -0
  211. package/dist/internal/conversation-pack.d.ts.map +1 -0
  212. package/dist/internal/conversation-pack.js +96 -0
  213. package/dist/internal/deploy-client.d.ts +2 -0
  214. package/dist/internal/deploy-client.d.ts.map +1 -1
  215. package/dist/internal/deploy-client.js +4 -0
  216. package/dist/internal/discovery/agent-config.d.ts +6 -0
  217. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  218. package/dist/internal/discovery/agent-config.js +19 -0
  219. package/dist/internal/discovery/agent.d.ts.map +1 -1
  220. package/dist/internal/discovery/agent.js +2 -1
  221. package/dist/internal/hosted-catch-protocol.d.ts +2 -0
  222. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  223. package/dist/internal/hosted-catch-protocol.js +2 -0
  224. package/dist/internal/hosted-catch.d.ts +2 -3
  225. package/dist/internal/hosted-catch.d.ts.map +1 -1
  226. package/dist/internal/hosted-catch.js +2 -3
  227. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  228. package/dist/internal/hosted-delivery.js +22 -12
  229. package/dist/internal/hosted-execution-flush.d.ts +6 -3
  230. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  231. package/dist/internal/hosted-execution-flush.js +28 -31
  232. package/dist/internal/peer-connections.d.ts +6 -2
  233. package/dist/internal/peer-connections.d.ts.map +1 -1
  234. package/dist/internal/peer-connections.js +23 -19
  235. package/dist/internal/sdk-runner.d.ts.map +1 -1
  236. package/dist/internal/sdk-runner.js +13 -2
  237. package/dist/internal/server.d.ts.map +1 -1
  238. package/dist/internal/server.js +6 -5
  239. package/dist/internal/session-engine.d.ts.map +1 -1
  240. package/dist/internal/session-engine.js +4 -0
  241. package/dist/internal/session-run-log.d.ts.map +1 -1
  242. package/dist/internal/session-run-log.js +26 -11
  243. package/dist/internal/turn-cost.d.ts +2 -2
  244. package/dist/internal/turn-cost.d.ts.map +1 -1
  245. package/dist/internal/turn-cost.js +17 -3
  246. package/dist/playground/assets/index-BVYWBxLU.css +1 -0
  247. package/dist/playground/assets/{index-DIiKbZ25.js → index-DCsq6f_I.js} +45 -45
  248. package/dist/playground/index.html +2 -2
  249. package/dist/types.d.ts +18 -0
  250. package/dist/types.d.ts.map +1 -1
  251. package/docs/README.md +1 -1
  252. package/docs/building-with-agents.md +5 -5
  253. package/docs/deployment.md +70 -33
  254. package/docs/evals.md +1 -16
  255. package/docs/guides/cloud-agents.md +3 -9
  256. package/docs/guides/grokbot-agents.md +10 -14
  257. package/docs/guides/hooks.md +0 -1
  258. package/docs/guides/improve.md +4 -6
  259. package/docs/guides/mcp-oauth.md +18 -41
  260. package/docs/guides/webhooks.md +35 -18
  261. package/docs/quickstart.md +2 -2
  262. package/docs/reference/channels.md +29 -13
  263. package/docs/reference/cli.md +113 -40
  264. package/docs/reference/connections.md +6 -5
  265. package/docs/reference/evals.md +2 -4
  266. package/docs/reference/hooks.md +0 -1
  267. package/docs/reference/http-api.md +7 -17
  268. package/docs/reference/playground.md +2 -5
  269. package/docs/reference/schedules.md +26 -3
  270. package/docs/reference/sessions.md +1 -2
  271. package/docs/reference/skills.md +1 -1
  272. package/docs/reference/tools.md +3 -29
  273. package/docs/templates/grokbot-agents.md +1 -1
  274. package/docs/troubleshooting.md +12 -7
  275. package/package.json +43 -32
  276. package/skills/create-agent/SKILL.md +9 -6
  277. package/skills/debug/SKILL.md +3 -4
  278. package/skills/evals/SKILL.md +2 -2
  279. package/skills/framework-map/SKILL.md +10 -10
  280. package/skills/mcp-auth/SKILL.md +10 -34
  281. package/skills/migrate-v2/SKILL.md +13 -9
  282. package/skills/setup-slack/SKILL.md +0 -13
  283. package/templates/agents-md/README.md +3 -3
  284. package/templates/agents-md/bot/channels/queue.ts +3 -8
  285. package/templates/agents-md/bot/instructions.md +1 -2
  286. package/templates/agents-md/bot/tools/apply_agents.ts +0 -1
  287. package/templates/agents-md/evals/agents.eval.ts +2 -2
  288. package/templates/demo/bot/channels/queue.ts +5 -15
  289. package/templates/grokbot-agents/.gitignore +4 -0
  290. package/templates/pr-autofixer/bot/channels/drive.ts +3 -16
  291. package/templates/security-help/.gitignore +4 -0
  292. package/templates/triage/bot/channels/queue.ts +11 -22
  293. package/templates/triage/bot/channels/webhook.ts +3 -6
  294. package/templates/triage/bot/lib/parse-queue-event.ts +0 -6
  295. package/dist/docs/assets/chunks/@localSearchIndexroot.DvlKuIO-.js +0 -1
  296. package/dist/docs/assets/chunks/channel.BRSFxCcD.js +0 -1
  297. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.Cmtm6WkN.js +0 -1
  298. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.Cmtm6WkN.js +0 -1
  299. package/dist/docs/assets/chunks/clone.JMC96Eo6.js +0 -1
  300. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.N4Am6sXd.js +0 -1
  301. package/dist/docs/assets/chunks/wardley-RL74JXVD._eATmGtu.js +0 -162
  302. package/dist/docs/assets/deployment.md.BYuEcDBv.js +0 -29
  303. package/dist/docs/assets/guides_cloud-agents.md.CWJjS9No.js +0 -10
  304. package/dist/docs/assets/guides_cloud-agents.md.CWJjS9No.lean.js +0 -1
  305. package/dist/docs/assets/guides_grokbot-agents.md.tD1smFhU.js +0 -16
  306. package/dist/docs/assets/guides_mcp-oauth.md.DR3zhC9r.lean.js +0 -1
  307. package/dist/docs/assets/reference_channels.md.LbNIJBwd.js +0 -23
  308. package/dist/docs/assets/reference_http-api.md.DbFNOubV.js +0 -11
  309. package/dist/docs/assets/reference_playground.md.1hx0gcIu.js +0 -1
  310. package/dist/docs/assets/reference_playground.md.1hx0gcIu.lean.js +0 -1
  311. package/dist/docs/assets/reference_sessions.md.CyM7ARz1.js +0 -1
  312. package/dist/docs/assets/reference_tools.md.DzIY9JzY.lean.js +0 -1
  313. package/dist/docs/assets/troubleshooting.md.x-GBa7wN.js +0 -1
  314. package/dist/playground/assets/index-CzttDc-d.css +0 -1
  315. /package/dist/docs/assets/{guides_hooks.md.5Ce3NXxZ.lean.js → guides_hooks.md.B_bKG1oA.lean.js} +0 -0
  316. /package/dist/docs/assets/{index.md.Dxxr7pFa.lean.js → index.md.BIBHIQtU.lean.js} +0 -0
  317. /package/dist/docs/assets/{quickstart.md.BK5gjHM2.lean.js → quickstart.md.CduLGBAB.lean.js} +0 -0
  318. /package/dist/docs/assets/{reference_evals.md.D5i8PuXJ.lean.js → reference_evals.md.if--BLd0.lean.js} +0 -0
  319. /package/dist/docs/assets/{reference_hooks.md.B-eGa2km.lean.js → reference_hooks.md.DbJC8mcZ.lean.js} +0 -0
  320. /package/dist/docs/assets/{reference_sessions.md.CyM7ARz1.lean.js → reference_sessions.md.C_uzIWuy.lean.js} +0 -0
  321. /package/dist/docs/assets/{reference_skills.md.C0guGcH0.lean.js → reference_skills.md.Ckddg6KX.lean.js} +0 -0
  322. /package/dist/docs/assets/{templates_grokbot-agents.md.2sydjFiO.lean.js → templates_grokbot-agents.md.DgpPEs7B.lean.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cursor/bdk",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
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": {
@@ -28,6 +28,7 @@
28
28
  "!dist/internal/review-comments*",
29
29
  "!dist/internal/shallow-clone.*",
30
30
  "!dist/internal/managed-delivery.*",
31
+ "!dist/filesystem-executors.*",
31
32
  "skills/**/*",
32
33
  "templates/**/*",
33
34
  "!templates/pr-autofixer/README.md",
@@ -47,6 +48,13 @@
47
48
  "import": "./dist/index.js",
48
49
  "default": "./dist/index.js"
49
50
  },
51
+ "./executors": {
52
+ "anysphere-source": "./src/filesystem-executors.ts",
53
+ "bun": "./dist/executors.js",
54
+ "types": "./dist/executors.d.ts",
55
+ "import": "./dist/executors.js",
56
+ "default": "./dist/executors.js"
57
+ },
50
58
  "./internal/cursor-hosted": {
51
59
  "anysphere-source": "./src/storage-backends/cursor-hosted.ts",
52
60
  "bun": "./dist/storage-backends/cursor-hosted.js",
@@ -278,34 +286,13 @@
278
286
  "default": "./package.json"
279
287
  }
280
288
  },
281
- "scripts": {
282
- "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",
283
- "build:dist": "node scripts/build-hosted-dist.mjs",
284
- "postinstall": "node -e \"try{const p='./scripts/install-cursor-skills.mjs';if(require('fs').existsSync(p))require('child_process').execFileSync(process.execPath,[p],{stdio:'inherit'})}catch{}\"",
285
- "build:playground": "vite build --config playground/vite.config.ts",
286
- "build:playground:central": "vite build --mode central --config playground/vite.config.ts",
287
- "dev:playground": "vite --config playground/vite.config.ts",
288
- "check": "oxlint src && tsc --noEmit && tsc --noEmit -p playground/tsconfig.json",
289
- "docs:dev": "vitepress dev docs",
290
- "docs:build": "vitepress build docs",
291
- "docs:preview": "vitepress preview docs",
292
- "docs:verify-links": "node scripts/verify-docs-links.mjs",
293
- "fix": "oxlint --fix src && oxfmt --write --no-error-on-unmatched-pattern src",
294
- "test": "vitest run --passWithNoTests",
295
- "type-check": "tsc --noEmit && tsc --noEmit -p playground/tsconfig.json",
296
- "build-dev": "echo noop",
297
- "build-types": "tsc -p tsconfig.build.json --emitDeclarationOnly",
298
- "verify-publish": "node scripts/verify-publish-artifacts.mjs",
299
- "smoke-publish": "node scripts/smoke-publish-artifact.mjs",
300
- "publish-check": "pnpm run build && pnpm run verify-publish && pnpm run smoke-publish"
301
- },
302
289
  "engines": {
303
290
  "node": ">=22.13"
304
291
  },
305
292
  "dependencies": {
306
293
  "@bazel/runfiles": "6.5.0",
307
- "@cursor/sdk": "1.0.32",
308
- "@modelcontextprotocol/sdk": "1.25.1",
294
+ "@cursor/sdk": "1.0.34",
295
+ "@modelcontextprotocol/sdk": "1.30.0",
309
296
  "@octokit/auth-app": "^7.2.0",
310
297
  "@octokit/rest": "^21.1.1",
311
298
  "@opentelemetry/api": "^1.9.0",
@@ -328,7 +315,7 @@
328
315
  "croner": "^8.0.1",
329
316
  "esbuild": "^0.25.0",
330
317
  "javascript-time-ago": "^2.6.4",
331
- "js-yaml": "4.1.0",
318
+ "js-yaml": "4.3.2",
332
319
  "minimatch": "^10.2.5",
333
320
  "ms": "^2.1.3",
334
321
  "proper-lockfile": "^4.1.2",
@@ -338,19 +325,17 @@
338
325
  "zod-to-json-schema": "^3.24.5"
339
326
  },
340
327
  "devDependencies": {
341
- "@anysphere/agent-store-sync": "workspace:*",
342
- "@anysphere/ui": "workspace:*",
343
328
  "@braintree/sanitize-url": "7.1.2",
344
329
  "@stylexswc/rs-compiler": "^0.18.0",
345
330
  "@tanstack/react-virtual": "3.13.23",
346
331
  "@types/js-yaml": "4.0.9",
347
332
  "@types/ms": "^2.1.0",
348
- "@types/node": "catalog:",
333
+ "@types/node": "22.14.1",
349
334
  "@types/pg": "^8.16.0",
350
335
  "@types/proper-lockfile": "^4.1.4",
351
336
  "@types/react": "^19.0.0",
352
337
  "@types/react-dom": "^19.0.0",
353
- "@typescript/native": "catalog:",
338
+ "@typescript/native": "npm:typescript@^7.0.2",
354
339
  "@vitejs/plugin-react": "^5.1.2",
355
340
  "cytoscape": "3.33.3",
356
341
  "cytoscape-cose-bilkent": "4.1.0",
@@ -363,12 +348,38 @@
363
348
  "react-markdown": "^10.1.0",
364
349
  "rehype-highlight": "^7.0.2",
365
350
  "remark-gfm": "^4.0.1",
366
- "typescript": "catalog:",
351
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
367
352
  "vite": "^7.3.0",
368
353
  "vitepress": "1.6.4",
369
354
  "vitepress-plugin-mermaid": "^2.0.17",
370
355
  "vitest": "^4.0.18",
371
356
  "yaml": "^2.4.2",
372
- "zustand": "^5.0.9"
357
+ "zustand": "^5.0.9",
358
+ "@anysphere/agent-exec": "1.0.0",
359
+ "@anysphere/agent-store-sync": "1.0.0",
360
+ "@anysphere/proto": "1.0.0",
361
+ "@anysphere/ui": "1.0.0",
362
+ "@anysphere/context": "1.0.0"
363
+ },
364
+ "scripts": {
365
+ "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",
366
+ "build:dist": "node scripts/build-hosted-dist.mjs",
367
+ "postinstall": "node -e \"try{const p='./scripts/install-cursor-skills.mjs';if(require('fs').existsSync(p))require('child_process').execFileSync(process.execPath,[p],{stdio:'inherit'})}catch{}\"",
368
+ "build:playground": "vite build --config playground/vite.config.ts",
369
+ "build:playground:central": "vite build --mode central --config playground/vite.config.ts",
370
+ "dev:playground": "vite --config playground/vite.config.ts",
371
+ "check": "oxlint src && tsc --noEmit && tsc --noEmit -p playground/tsconfig.json",
372
+ "docs:dev": "vitepress dev docs",
373
+ "docs:build": "vitepress build docs",
374
+ "docs:preview": "vitepress preview docs",
375
+ "docs:verify-links": "node scripts/verify-docs-links.mjs",
376
+ "fix": "oxlint --fix src && oxfmt --write --no-error-on-unmatched-pattern src",
377
+ "test": "vitest run --passWithNoTests",
378
+ "type-check": "tsc --noEmit && tsc --noEmit -p playground/tsconfig.json",
379
+ "build-dev": "echo noop",
380
+ "build-types": "tsc -p tsconfig.build.json --emitDeclarationOnly",
381
+ "verify-publish": "node scripts/verify-publish-artifacts.mjs",
382
+ "smoke-publish": "node scripts/smoke-publish-artifact.mjs",
383
+ "publish-check": "pnpm run build && pnpm run verify-publish && pnpm run smoke-publish"
373
384
  }
374
- }
385
+ }
@@ -6,7 +6,7 @@ description: >-
6
6
  agent. Ask only what the invoking message left open.
7
7
  ---
8
8
 
9
- # Create an BDK agent
9
+ # Create a BDK agent
10
10
 
11
11
  1. **Interview.** Two `AskQuestion` rounds, then a plan gate.
12
12
  2. **Scaffold.** `bdk init`, then shape the files.
@@ -48,7 +48,7 @@ on a running host.
48
48
  | **Model** | `grok-4.5` + `effort=high`, `fast=true` · Other id | Params, not id suffixes: `{ id: "grok-4.5", params: [{ id: "effort", value: "high" }, { id: "fast", value: "true" }] }` |
49
49
  | **Channels** (multi) | playground + HTTP (always on) · Slack · GitHub · custom webhook · schedule | Slack: `skills/setup-slack/SKILL.md`. GitHub: `skills/github/SKILL.md`. No Discord/Teams pack; offer custom webhook. |
50
50
  | **MCP** (multi) | none · remote URL · local stdio · Cursor account connectors · Other | One file under `bot/mcp-connections/`. Account file is `account.ts`, never `cursor.ts`. Named local tools need `advertiseTools: true`. Privileged servers go in `bot/host-connections/`. |
51
- | **Capabilities** (multi) | server tools · agent tools · skills · subagents · hooks · sandbox seeds · approvals · evals (recommend) | Always recommend one smoke eval. |
51
+ | **Capabilities** (multi) | server tools · agent tools · skills · subagents · hooks · sandbox seeds · evals (recommend) | Always recommend one smoke eval. |
52
52
 
53
53
  Close with the plan and file tree, then "Scaffold it" / "Adjust
54
54
  something". Write files only after approval.
@@ -72,13 +72,13 @@ Defaults:
72
72
  - `bot/instructions.md`: identity, when to use which tool,
73
73
  output shape.
74
74
  - One tool per file. Prefer `execution: "server"` + zod
75
- `inputSchema`. Gate side effects with `needsApproval: true`.
75
+ `inputSchema`. Declare `effect: "read"` or `"write"` on each tool.
76
76
  - Long prompts: `prompt\`…\`` / `prompt.lines\`…\`` from
77
77
  `@cursor/bdk`.
78
78
  - Host prep is for evidence (`callTool`, `workspaceFiles`), not
79
79
  judgment, formatting, or replies.
80
- - Remembered state is `ctx.host.kv`. The process is not a
81
- persistent box: a module `Map` is empty on the next replica.
80
+ - Remembered state is `ctx.host.kv`. On Cursor hosting, a later
81
+ event can run in a new process, where a module `Map` starts empty.
82
82
  File bytes that must outlive the process go in `ctx.host.files`.
83
83
  See `skills/framework-map/SKILL.md`.
84
84
 
@@ -154,7 +154,10 @@ project state directory (`--state-root`). That is not harness cwd.
154
154
  - **Slack.** `skills/setup-slack/SKILL.md`
155
155
  - **GitHub.** `skills/github/SKILL.md`
156
156
  - **Custom webhook.** `POST /v1/channels/<id>/<route>`.
157
- Loopback-only until you add `bearerAuth(...)`.
157
+ Loopback-only until you add `bearerAuth(...)`. Hosted callers
158
+ get an empty `202` before the handler runs, so return
159
+ `new Response(null, { status: 202 })` and deliver results from
160
+ the channel's `events`.
158
161
  - **Schedules.** Never auto-fire under `--dev`.
159
162
  `POST /v1/dev/schedules/<id>`.
160
163
 
@@ -2,13 +2,13 @@
2
2
  name: bdk-debug
3
3
  description: >-
4
4
  Diagnose a misbehaving local BDK agent: blank playground,
5
- missing sessions, failed reads, webhook 401s, 403/409, lost
6
- approvals. Use when a project runs but behaves wrong locally.
5
+ missing sessions, failed reads, webhook 401s, 403/409. Use when
6
+ a project runs but behaves wrong locally.
7
7
  ---
8
8
 
9
9
  # Debugging the BDK locally
10
10
 
11
- Local `bdk serve`. Hosted start or health failures:
11
+ Local `bdk serve`. Hosted start failures:
12
12
  `docs/troubleshooting.md` and `docs/deployment.md`.
13
13
 
14
14
  1. **Validate.** `bdk validate --dir <project>`
@@ -27,7 +27,6 @@ Local `bdk serve`. Hosted start or health failures:
27
27
  | Answers cite ancestor `AGENTS.md` | Nested checkout. Default `local.cwd` is a cache directory under `~/.cache`. |
28
28
  | Model lists IDE `cursor` tools, never MCP | `advertiseTools: true`. Check `GET /v1/info`. |
29
29
  | Port 3000 in use | `lsof -iTCP:3000 -sTCP:LISTEN` and kill that pid. |
30
- | Approval vanished after restart | Parked calls do not survive restart. Re-run. |
31
30
  | Schedule / reminder silent under `--dev` | Dev never auto-fires. `POST /<slug>/v1/dev/schedules/<id>`. |
32
31
  | `409` on follow-up | Stale `continuationToken`, busy session, or a task session. |
33
32
  | `409 session_busy` on `call --session` | Wait, or drop `--session`. |
@@ -84,11 +84,11 @@ export default defineEvalConfig({
84
84
  ```
85
85
 
86
86
  Either `test(t)` or `cases`, not both. `t.send` waits for the turn to
87
- settle (complete, park, or fail) and returns it; `turn.calledTool(...)`
87
+ settle (complete or fail) and returns it; `turn.calledTool(...)`
88
88
  reads only that turn, `t.*` reads the whole run. First-send options:
89
89
  `workspaceFiles`, `workspaceDir`.
90
90
 
91
- Gates: `t.succeeded()` / `t.parked()`,
91
+ Gates: `t.succeeded()`,
92
92
  `calledTool(name, { input, output, status, count })` / `notCalledTool`,
93
93
  `toolOrder`, `maxToolCalls`, `taggedArtifact`, `event` / `notEvent`,
94
94
  `t.check(value, includes | equals | matches | similarity | satisfies)`.
@@ -33,9 +33,9 @@ Public docs: `node_modules/@cursor/bdk/dist/docs/llms.txt` or
33
33
  `CURSOR_API_KEY_FILE`, then `CURSOR_SERVICE_ACCOUNT_KEY`, then
34
34
  `bdk login`). `validate`,
35
35
  `info`, `call`, and `serve` bring-up do not.
36
- 7. **Memory is `ctx.host.kv`.** The process is not a persistent
37
- box. A later event can run on another replica. Module `Map`s,
38
- globals, and ad-hoc files do not survive that.
36
+ 7. **Memory is `ctx.host.kv`.** On Cursor hosting, a later event
37
+ can run in a new process. Module `Map`s, globals, and local files
38
+ do not carry over.
39
39
 
40
40
  ## Folder structure
41
41
 
@@ -63,8 +63,8 @@ Path is identity. Full list: README "Folder structure".
63
63
 
64
64
  ## Runtime
65
65
 
66
- Turns run on the serve host. Server tools, approvals, agent tools,
67
- skills, and sandbox seeds are available there.
66
+ Turns run on the serve host. Server tools, agent tools, skills, and
67
+ sandbox seeds are available there.
68
68
 
69
69
  ## Sessions
70
70
 
@@ -84,9 +84,9 @@ Anything you need to remember goes in `ctx.host.kv`: coalesce,
84
84
  dedupe, cursors, a decision a later turn must see. `get`, `put`,
85
85
  and `delete`. Values are JSON.
86
86
 
87
- Hosted BDK is multi-tenant. The serve process is replaced,
88
- and the next hook, tool call, channel event, or footer can land
89
- on a different process. Do not assume this box is still up.
87
+ On Cursor hosting, the platform can replace the serve process at
88
+ any time. The next hook, tool call, or channel event can run in a
89
+ new process, so do not assume this one is still up.
90
90
 
91
91
  - The store is shared by every session of the agent. Prefix keys
92
92
  with `ctx.session.id` for per-session memory.
@@ -107,14 +107,14 @@ before you return.
107
107
  Code: side-effect gates, write dedupe (the record lives in
108
108
  `ctx.host.kv`), auth, evidence seeding, hard API caps. Model:
109
109
  formatting, summarizing, classification, replies.
110
- Budget: `skills/create-bot/SKILL.md`.
110
+ Budget: `skills/create-agent/SKILL.md`.
111
111
 
112
112
  Loop: `validate` / `info` / `call` / `run` / `eval` / `serve`. Serve
113
113
  only this agent's directory.
114
114
 
115
115
  | Task | Skill |
116
116
  | --- | --- |
117
- | Scaffold | `skills/create-bot/SKILL.md` |
117
+ | Scaffold | `skills/create-agent/SKILL.md` |
118
118
  | Evals | `skills/evals/SKILL.md` |
119
119
  | OpenTelemetry | `skills/otel/SKILL.md` |
120
120
  | GitHub | `skills/github/SKILL.md` |
@@ -2,8 +2,8 @@
2
2
  name: bdk-mcp-auth
3
3
  description: >-
4
4
  Authorize host MCP OAuth for defineConnection({ url, oauth: true }):
5
- bdk mcp oauth, local tokens, --store, advertiseTools, egress.
6
- Use when wiring or debugging MCP auth.
5
+ bdk mcp oauth, local tokens, advertiseTools, egress, and the hosted
6
+ cursorAccount path. Use when wiring or debugging MCP auth.
7
7
  ---
8
8
 
9
9
  # Host MCP OAuth
@@ -24,17 +24,14 @@ can still call `ctx.host.mcp`.
24
24
  1. **Declare the connection.** `bot/mcp-connections/<name>.ts`
25
25
  with `url` + `oauth: true`. Use `bot/host-connections/` when
26
26
  the model must not see it.
27
- 2. **Name the secrets** if you will `--store`:
28
- `hosting.secretNames` lists
29
- `MCP_OAUTH_<NAME>_{ACCESS_TOKEN,REFRESH_TOKEN,CLIENT_ID}`.
30
- 3. **Allow egress** on hosted non-bootstrap hosts:
27
+ 2. **Allow egress** on hosted non-bootstrap hosts:
31
28
  `hosting.egressDomains`.
32
- 4. **Authorize.** Local: `bdk mcp oauth <name>`. Hosted:
33
- finish Connect so the current process can retry, then
34
- `bdk mcp oauth <name> --store` and `bdk deploy` so
35
- the next pod gets `MCP_OAUTH_*`. `secrets list` shows the names.
36
- Secrets are deployment-wide, not per caller. `cursorAccount: true`
37
- stays on the Cursor backend.
29
+ 3. **Authorize.** Local: `bdk mcp oauth <name>`, or finish
30
+ Connect in the playground so the current process can retry.
31
+ Tokens stay on this machine. Hosted: use a
32
+ `cursorAccount: true` connection and connect the server from
33
+ **Deployed Agents** in the dashboard; its tokens stay on the
34
+ Cursor backend.
38
35
 
39
36
  ```ts
40
37
  // bot/mcp-connections/inventory.ts
@@ -44,41 +41,20 @@ export default defineConnection({
44
41
  });
45
42
  ```
46
43
 
47
- ```ts
48
- // bot/agent.ts
49
- export default defineAgent({
50
- hosting: {
51
- secretNames: [
52
- "MCP_OAUTH_INVENTORY_ACCESS_TOKEN",
53
- "MCP_OAUTH_INVENTORY_REFRESH_TOKEN",
54
- "MCP_OAUTH_INVENTORY_CLIENT_ID",
55
- ],
56
- egressDomains: ["mcp.example.com"],
57
- },
58
- });
59
- ```
60
-
61
- File `inventory.ts` → prefix `MCP_OAUTH_INVENTORY`. Do not put
62
- `CURSOR_*` names in `secretNames`.
63
-
64
44
  ```bash
65
45
  bdk mcp oauth <connection>
66
- bdk mcp oauth <connection> --store [--slug <slug>]
67
- bdk secrets list <slug>
68
- bdk deploy
69
46
  ```
70
47
 
71
48
  Browser callback: `http://127.0.0.1:8787/callback`. Tokens live in
72
49
  the CLI config directory (`mcp-auth.json` or
73
50
  `$AGENT_SERVE_CONFIG_DIR`). URL change drops the old entry; re-run.
74
- `--store` does not restart a running engine.
75
51
 
76
52
  | Symptom | Fix |
77
53
  | --- | --- |
78
54
  | `must be defineConnection({ url, oauth: true })` | Wrong name or missing `oauth: true` |
79
55
  | `Unknown MCP connection` | Filename must match the CLI arg |
80
56
  | Callback hang | Free port 8787; finish the browser flow here |
81
- | Hosted 401 | `secrets list`; Connect or `--store`; redeploy |
57
+ | Hosted 401 | Local tokens don't reach the deployment. Switch to `cursorAccount: true`; connect from **Deployed Agents** |
82
58
  | Model invents `mcp_auth` / IDE MCP | `advertiseTools: true` on local turns |
83
59
 
84
60
  No raw tokens in git.
@@ -62,18 +62,18 @@ ends. That model changes code in three places:
62
62
  | Local `bdk dev`, `run`, `eval`, and the playground | Supported |
63
63
  | `defineStorage` in `agent/storage.ts` | Not supported. Delete the file. |
64
64
  | Reminders with inline `run` or a function `until` | Not supported. Use a named handler. |
65
- | Cron schedules in `agent/schedules/` on Cursor hosting | Not delivered yet. Self-hosted `bdk serve` still runs them. |
65
+ | Cron schedules in `agent/schedules/` on Cursor hosting | Supported with `@cursor/bdk` 0.2.14 or newer. Each fire runs in a new runtime and must finish in 26 minutes. |
66
66
  | Slack tool-approval buttons on Cursor hosting | Not supported yet |
67
67
  | `bdk mcp oauth --store` for host MCP OAuth | Not supported. Connect Cursor-account MCP servers from **Deployed Agents** in the dashboard. |
68
- | `/v1/health`, session, tool, and MCP APIs on the deployment URL | Not reachable |
69
- | `--prod` with `chat`, `resume`, `call`, `sessions`, `cost`, or `mcp` | Not supported. Use `run --prod`, `session --prod`, and `logs --prod`. |
68
+ | Session, tool, and MCP APIs on the deployment URL | Not reachable |
69
+ | `--prod` with `chat`, `resume`, `call`, `skill`, `sessions`, `cost`, or `mcp` | Not supported. Use `run --prod`, `logs --prod`, `session --prod`, and `playground --prod`. |
70
70
  | v1 sessions, KV, and files | Not carried over. v2 starts empty, and deleting v1 deletes them. |
71
71
 
72
72
  The steps below rewrite `defineStorage`, inline reminders, SCM channel
73
73
  credentials, and secret reads. Stop and ask before migrating an agent
74
- that depends on cron schedules, Slack tool-approval buttons,
75
- `mcp oauth --store`, or an HTTP route whose caller reads the response
76
- body. Name the row and the file that uses it.
74
+ that depends on Slack tool-approval buttons, `mcp oauth --store`, or an
75
+ HTTP route whose caller reads the response body. Name the row and the
76
+ file that uses it.
77
77
 
78
78
  ## Update the project
79
79
 
@@ -181,7 +181,8 @@ still loads.
181
181
 
182
182
  8. **Stop answering from HTTP routes.** A custom route that returned
183
183
  computed data must deliver it another way, such as a callback URL or a
184
- tool the turn calls.
184
+ tool the turn calls. Return `new Response(null, { status: 202 })` so
185
+ local runs match the hosted response.
185
186
 
186
187
  ## Verify locally
187
188
 
@@ -257,8 +258,11 @@ After the deploy is running:
257
258
  secrets go unused.
258
259
  - Reconnect Cursor-account MCP servers from **Deployed Agents** in the
259
260
  dashboard.
260
- - Start a turn with `bdk run --prod --slug <slug> --message "..."`, then
261
- read it with `bdk session <ses_...> --prod --slug <slug>`.
261
+ - Start a turn with `bdk run --prod --slug <slug> --message "..."`. It
262
+ prints a `deliveryId`, not a session. Find the `ses_...` header in
263
+ `bdk logs --prod --once --slug <slug>`, then read the turn with
264
+ `bdk session <ses_...> --prod --slug <slug>` until the latest run
265
+ finishes.
262
266
 
263
267
  The [deploy skill](../deploy/SKILL.md) covers deploys with an attached
264
268
  service account.
@@ -134,16 +134,3 @@ export default slackChannel({
134
134
  Pass `--channel-posts` on `create` / `init --manual`. Invite the
135
135
  bot to each watched channel. Mentions stay on `app_mention`; a
136
136
  later mention continues the watch thread.
137
-
138
- ## Approvals (opt-in)
139
-
140
- ```ts
141
- export default slackChannel({
142
- envPrefix: "JENNY",
143
- toolApprovals: true,
144
- });
145
- ```
146
-
147
- Wizard enables interactivity when this is set. Server tools on
148
- `local` only. Parked calls die on host restart. Cards truncate
149
- args; execution uses the full input.
@@ -1,9 +1,9 @@
1
1
  # Living AGENTS.md
2
2
 
3
3
  Keeps `AGENTS.md` current from last week's merged pull requests and the
4
- listed Slack channels. Parks an update until a person approves it, then
5
- opens a draft follow-up PR. Chores stay quiet. Same-base updates stack
6
- on `agents-md/<base>`.
4
+ listed Slack channels. Opens each update as a draft follow-up PR for a
5
+ person to review. Chores stay quiet. Same-base updates stack on
6
+ `agents-md/<base>`.
7
7
 
8
8
  ```text
9
9
  npx @cursor/bdk init ./agents-md --template agents-md
@@ -7,14 +7,9 @@ export default defineChannel({
7
7
  POST("/run", {
8
8
  description: "Collect last week's PRs and Slack, then review AGENTS.md",
9
9
  bodySchema: z.object({}),
10
- handler: async (_req, { send, host, auth }) => {
11
- const week = await collectWeek(host);
12
- const session = await startWeek(send, week, auth);
13
- return Response.json({
14
- ok: true,
15
- sessionId: session.id,
16
- window: week.window,
17
- });
10
+ handler: async (_req, { send, waitUntil, host, auth }) => {
11
+ waitUntil(collectWeek(host).then((week) => startWeek(send, week, auth)));
12
+ return new Response(null, { status: 202 });
18
13
  },
19
14
  }),
20
15
  ],
@@ -33,7 +33,6 @@ Call `apply_agents` once.
33
33
  Paths must be `AGENTS.md` or `*/AGENTS.md`. Short declarative sentences.
34
34
  Edit only the stale or missing rules. Keep the existing voice.
35
35
 
36
- An update parks until a person approves the write. The follow-up PR
37
- opens as a draft.
36
+ The follow-up PR opens as a draft for a person to review.
38
37
 
39
38
  Reply with `skip` or `update` and the reason.
@@ -26,7 +26,6 @@ type Write = {
26
26
 
27
27
  export default defineTool({
28
28
  description: "Skip or open an AGENTS.md follow-up PR for this weekly review. Call once.",
29
- needsApproval: (input) => input.verdict === "update",
30
29
  effect: (input) => (input.verdict === "update" ? "write" : "read"),
31
30
  inputSchema: z.discriminatedUnion("verdict", [
32
31
  z.object({
@@ -78,7 +78,7 @@ export default defineEval({
78
78
  },
79
79
  {
80
80
  id: "update-rule",
81
- description: "A repeated billing rule parks the AGENTS.md write.",
81
+ description: "A repeated billing rule opens an AGENTS.md update.",
82
82
  async test(t) {
83
83
  await t.send(weekly(), {
84
84
  workspaceFiles: {
@@ -91,7 +91,7 @@ export default defineEval({
91
91
  "week/tree/AGENTS.md.txt": "# API\n\nKeep handlers thin.\n",
92
92
  },
93
93
  });
94
- t.parked();
94
+ t.succeeded();
95
95
  t.calledTool("apply_agents", { input: { verdict: "update" } });
96
96
  },
97
97
  },
@@ -2,7 +2,7 @@ import { defineChannel, POST } from "@cursor/bdk/channels";
2
2
  import { parseGitHubPrRef } from "@cursor/bdk/channels/github";
3
3
  import { z } from "zod";
4
4
  import { startDemo } from "../lib/collect.js";
5
- import { REPOS, watches } from "../lib/repos.js";
5
+ import { watches } from "../lib/repos.js";
6
6
 
7
7
  export default defineChannel({
8
8
  routes: [
@@ -11,23 +11,13 @@ export default defineChannel({
11
11
  bodySchema: z.object({
12
12
  pr: z.string().describe("GitHub PR URL or owner/repo#N"),
13
13
  }),
14
- handler: async (_req, { send, host, body }) => {
14
+ handler: async (_req, { send, waitUntil, host, body }) => {
15
15
  const ref = parseGitHubPrRef(body.pr);
16
16
  if (ref === undefined || !watches(`${ref.owner}/${ref.repo}`)) {
17
- return Response.json(
18
- {
19
- ok: false,
20
- error: `need a PR URL or owner/repo#N in ${REPOS.join(", ")}`,
21
- },
22
- { status: 400 },
23
- );
17
+ return new Response(null, { status: 400 });
24
18
  }
25
- const session = await startDemo(send, host.github, ref);
26
- return Response.json({
27
- ok: true,
28
- sessionId: session.id,
29
- pr: ref.label,
30
- });
19
+ waitUntil(startDemo(send, host.github, ref));
20
+ return new Response(null, { status: 202 });
31
21
  },
32
22
  }),
33
23
  ],
@@ -0,0 +1,4 @@
1
+ node_modules
2
+ .env
3
+ .env.local
4
+ memory
@@ -7,30 +7,17 @@ export default defineChannel({
7
7
  POST("/", {
8
8
  description: "Start PR autofixer on a GitHub PR (same path as the drive_pr tool).",
9
9
  bodySchema: driveStartBodySchema,
10
- handler: async (req, { send, sessionUrls, host, body }) => {
10
+ handler: async (_req, { send, host, body }) => {
11
11
  const result = await startDrive({
12
12
  pr: body.pr,
13
13
  hint: body.hint,
14
14
  send,
15
15
  host,
16
16
  });
17
-
18
17
  if (!result.ok) {
19
- return Response.json({ error: result.error }, { status: 400 });
18
+ return new Response(null, { status: 400 });
20
19
  }
21
-
22
- return Response.json({
23
- pr: result.pr,
24
- sessionId: result.sessionId,
25
- continuationToken: result.continuationToken,
26
- bcId: result.bcId,
27
- agentUrl: result.agentUrl,
28
- status: result.status,
29
- result: result.result,
30
- playgroundUrl:
31
- result.sessionId === null ? null : sessionUrls(req, result.sessionId).playgroundUrl,
32
- mergeConflictReminderId: result.mergeConflictReminderId,
33
- });
20
+ return new Response(null, { status: 202 });
34
21
  },
35
22
  }),
36
23
  ],
@@ -0,0 +1,4 @@
1
+ node_modules
2
+ .env
3
+ .env.local
4
+ memory
@@ -1,6 +1,6 @@
1
1
  import { defineChannel, POST } from "@cursor/bdk/channels";
2
2
  import { z } from "zod";
3
- import { formatQueuePrompt, isTrackerWebhook, parseQueueEvent } from "../lib/parse-queue-event.js";
3
+ import { formatQueuePrompt, parseQueueEvent } from "../lib/parse-queue-event.js";
4
4
 
5
5
  export default defineChannel({
6
6
  routes: [
@@ -11,29 +11,18 @@ export default defineChannel({
11
11
  const parsed = parseQueueEvent(body);
12
12
  if (!parsed.ok) {
13
13
  if ("ignored" in parsed) {
14
- return Response.json({ ok: true, ignored: true });
14
+ return new Response(null, { status: 202 });
15
15
  }
16
- return Response.json({ ok: false, error: parsed.error }, { status: 400 });
16
+ return new Response(null, { status: 400 });
17
17
  }
18
- const options = {
19
- continuationToken: parsed.issue.identifier,
20
- admission: "coalesce" as const,
21
- title: parsed.issue.title === "" ? undefined : parsed.issue.title,
22
- };
23
- const prompt = formatQueuePrompt(parsed.issue);
24
- if (isTrackerWebhook(body)) {
25
- waitUntil(send(prompt, options));
26
- return Response.json({
27
- ok: true,
28
- identifier: parsed.issue.identifier,
29
- });
30
- }
31
- const session = await send(prompt, options);
32
- return Response.json({
33
- ok: true,
34
- sessionId: session.id,
35
- identifier: parsed.issue.identifier,
36
- });
18
+ waitUntil(
19
+ send(formatQueuePrompt(parsed.issue), {
20
+ continuationToken: parsed.issue.identifier,
21
+ admission: "coalesce",
22
+ title: parsed.issue.title === "" ? undefined : parsed.issue.title,
23
+ }),
24
+ );
25
+ return new Response(null, { status: 202 });
37
26
  },
38
27
  }),
39
28
  ],