@cursor/bdk 0.2.14 → 0.2.16

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 (392) 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 +41 -3
  5. package/dist/channels/github/index.d.ts +1 -1
  6. package/dist/channels/github/index.d.ts.map +1 -1
  7. package/dist/channels/github/index.js +1 -1
  8. package/dist/channels/slack/attachments.d.ts +2 -0
  9. package/dist/channels/slack/attachments.d.ts.map +1 -1
  10. package/dist/channels/slack/attachments.js +17 -5
  11. package/dist/channels/slack/channel-watch.d.ts +4 -2
  12. package/dist/channels/slack/channel-watch.d.ts.map +1 -1
  13. package/dist/channels/slack/channel-watch.js +4 -2
  14. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  15. package/dist/channels/slack/slack-channel.js +4 -2
  16. package/dist/channels/slack/types.d.ts +6 -4
  17. package/dist/channels/slack/types.d.ts.map +1 -1
  18. package/dist/connections.d.ts +29 -0
  19. package/dist/connections.d.ts.map +1 -1
  20. package/dist/connections.js +54 -0
  21. package/dist/docs/404.html +2 -2
  22. package/dist/docs/assets/{app.BN3sgOOo.js → app.BSrZkTHD.js} +4 -4
  23. package/dist/docs/assets/{building-with-agents.md.Df87rAe1.js → building-with-agents.md.Bi9CQ-bR.js} +3 -3
  24. package/dist/docs/assets/{building-with-agents.md.Df87rAe1.lean.js → building-with-agents.md.Bi9CQ-bR.lean.js} +1 -1
  25. package/dist/docs/assets/chunks/@localSearchIndexroot.JUnN1Be1.js +1 -0
  26. package/dist/docs/assets/chunks/{VPLocalSearchBox.CbA00dML.js → VPLocalSearchBox.BxmgcwIX.js} +1 -1
  27. package/dist/docs/assets/chunks/{arc.Byug8CZM.js → arc.CAid9y9R.js} +1 -1
  28. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.D1_qmnQy.js → architectureDiagram-Q4EWVU46.kLxg-1A5.js} +1 -1
  29. package/dist/docs/assets/chunks/{baseUniq.Dj-Nurf-.js → baseUniq.BWvpjFlO.js} +1 -1
  30. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.BZwq3EIg.js → blockDiagram-DXYQGD6D.DyjX8R7M.js} +1 -1
  31. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.dx75urO7.js → c4Diagram-AHTNJAMY.DBdWlnqr.js} +1 -1
  32. package/dist/docs/assets/chunks/channel.CWc3NN9g.js +1 -0
  33. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CIoddsDQ.js → chunk-4BX2VUAB.T5enPS2D.js} +1 -1
  34. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.O3VsVBES.js → chunk-4TB4RGXK.D6zswRAS.js} +1 -1
  35. package/dist/docs/assets/chunks/{chunk-55IACEB6.WNNWh0Pe.js → chunk-55IACEB6.Bh05N-a3.js} +1 -1
  36. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.BKVQwEME.js → chunk-EDXVE4YY.DZv_O-d9.js} +1 -1
  37. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.Cv5iBz7A.js → chunk-FMBD7UC4.BY53CZaL.js} +1 -1
  38. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.wCDCToee.js → chunk-OYMX7WX6.CO5lI2PE.js} +1 -1
  39. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.D3IGXhXA.js → chunk-QZHKN3VN.DMfpW0s4.js} +1 -1
  40. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.CAPPh-E7.js → chunk-YZCP3GAM.COPT56Nr.js} +1 -1
  41. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.D5a745iS.js +1 -0
  42. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.D5a745iS.js +1 -0
  43. package/dist/docs/assets/chunks/clone.CCGVqN_B.js +1 -0
  44. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BQCFH3M5.js → cose-bilkent-S5V4N54A.BJSj7zzd.js} +1 -1
  45. package/dist/docs/assets/chunks/{dagre-KV5264BT.lHmdrh7L.js → dagre-KV5264BT.DDv7IQZT.js} +1 -1
  46. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.EtSPnHgD.js → diagram-5BDNPKRD.BUoE9HFH.js} +1 -1
  47. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.DCyUnQT8.js → diagram-G4DWMVQ6.BF3JtrnJ.js} +1 -1
  48. package/dist/docs/assets/chunks/{diagram-MMDJMWI5._E0Qqblb.js → diagram-MMDJMWI5.BvuCWc4e.js} +1 -1
  49. package/dist/docs/assets/chunks/{diagram-TYMM5635.BDj4oyy_.js → diagram-TYMM5635._EqUGqFN.js} +1 -1
  50. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.CrvnO6a3.js → erDiagram-SMLLAGMA.DxNvSdzj.js} +1 -1
  51. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.DIhYc-2F.js → flowDiagram-DWJPFMVM.DVtRP546.js} +1 -1
  52. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.hFqm_vio.js → ganttDiagram-T4ZO3ILL.Bn9vb7xI.js} +1 -1
  53. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.N3GDaVDD.js → gitGraphDiagram-UUTBAWPF.45r6n737.js} +1 -1
  54. package/dist/docs/assets/chunks/{graph.DK28rMBx.js → graph.BOkX3Ws_.js} +1 -1
  55. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.DHmE6W9M.js → infoDiagram-42DDH7IO.DyBCcxOm.js} +1 -1
  56. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.ByUJuOYm.js → ishikawaDiagram-UXIWVN3A.kg0ywDlx.js} +1 -1
  57. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BIUChFMh.js → journeyDiagram-VCZTEJTY.BUfrLnXA.js} +1 -1
  58. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CNgFXwo-.js → kanban-definition-6JOO6SKY.Bn7X35b2.js} +1 -1
  59. package/dist/docs/assets/chunks/{layout.BDnwE4ET.js → layout.B0QW6d8M.js} +1 -1
  60. package/dist/docs/assets/chunks/{linear.DmrYLXFs.js → linear.C59eCF0D.js} +1 -1
  61. package/dist/docs/assets/chunks/{min.BbYcWakN.js → min.BnDl0p08.js} +1 -1
  62. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.C9x-klkv.js → mindmap-definition-QFDTVHPH.u2HYLooo.js} +1 -1
  63. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.iufpEbi0.js → pieDiagram-DEJITSTG.CbnIrr9l.js} +1 -1
  64. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DdoXbWL9.js → quadrantDiagram-34T5L4WZ.D2zWIixq.js} +1 -1
  65. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.XL1-_pNk.js → requirementDiagram-MS252O5E.DvOFa3oO.js} +1 -1
  66. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.DySXofNs.js → sankeyDiagram-XADWPNL6.BfKCkH3x.js} +1 -1
  67. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.Cp0GZoOU.js → sequenceDiagram-FGHM5R23.CUPKdYN0.js} +1 -1
  68. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.DvK-sXUX.js → stateDiagram-FHFEXIEX.CimDCRiK.js} +1 -1
  69. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.ClNUVSTQ.js +1 -0
  70. package/dist/docs/assets/chunks/{theme.Clup4iIo.js → theme.CKht7z82.js} +2 -2
  71. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.gHI9ZLm6.js → timeline-definition-GMOUNBTQ.BFTd5qKs.js} +1 -1
  72. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.G2N2zXYe.js → vennDiagram-DHZGUBPP.N6t5MmCb.js} +1 -1
  73. package/dist/docs/assets/chunks/wardley-RL74JXVD.D2G6Zyds.js +162 -0
  74. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.BgUKEagd.js → wardleyDiagram-NUSXRM2D.BqScALbL.js} +1 -1
  75. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.CwH7oege.js → xychartDiagram-5P7HB3ND.Br0WiDkT.js} +1 -1
  76. package/dist/docs/assets/deployment.md.hKKN9I4c.js +31 -0
  77. package/dist/docs/assets/{deployment.md.BYuEcDBv.lean.js → deployment.md.hKKN9I4c.lean.js} +1 -1
  78. package/dist/docs/assets/{evals.md.C851kViu.js → evals.md.CHR34K1Y.js} +3 -7
  79. package/dist/docs/assets/{evals.md.C851kViu.lean.js → evals.md.CHR34K1Y.lean.js} +1 -1
  80. package/dist/docs/assets/guides_cloud-agents.md.CBK7W0-O.js +9 -0
  81. package/dist/docs/assets/guides_cloud-agents.md.CBK7W0-O.lean.js +1 -0
  82. package/dist/docs/assets/guides_grokbot-agents.md.BwAykJ7U.js +15 -0
  83. package/dist/docs/assets/{guides_grokbot-agents.md.tD1smFhU.lean.js → guides_grokbot-agents.md.BwAykJ7U.lean.js} +1 -1
  84. package/dist/docs/assets/{guides_hooks.md.5Ce3NXxZ.js → guides_hooks.md.B_bKG1oA.js} +1 -1
  85. package/dist/docs/assets/{guides_improve.md.CRrYq22s.js → guides_improve.md.CZKVt1cT.js} +2 -3
  86. package/dist/docs/assets/{guides_improve.md.CRrYq22s.lean.js → guides_improve.md.CZKVt1cT.lean.js} +1 -1
  87. package/dist/docs/assets/{guides_mcp-oauth.md.DR3zhC9r.js → guides_mcp-oauth.md.BM_eFC0L.js} +3 -15
  88. package/dist/docs/assets/guides_mcp-oauth.md.BM_eFC0L.lean.js +1 -0
  89. package/dist/docs/assets/{guides_webhooks.md.BBvAm_VF.js → guides_webhooks.md.Cpdc3BDX.js} +13 -12
  90. package/dist/docs/assets/{guides_webhooks.md.BBvAm_VF.lean.js → guides_webhooks.md.Cpdc3BDX.lean.js} +1 -1
  91. package/dist/docs/assets/{index.md.Dxxr7pFa.js → index.md.BIBHIQtU.js} +1 -1
  92. package/dist/docs/assets/{quickstart.md.BK5gjHM2.js → quickstart.md.CduLGBAB.js} +1 -1
  93. package/dist/docs/assets/{reference_agent-config.md.DrtLxWgR.js → reference_agent-config.md.DYA6ge6t.js} +7 -4
  94. package/dist/docs/assets/{reference_agent-config.md.DrtLxWgR.lean.js → reference_agent-config.md.DYA6ge6t.lean.js} +1 -1
  95. package/dist/docs/assets/reference_channels.md.DYg0CLud.js +22 -0
  96. package/dist/docs/assets/{reference_channels.md.LbNIJBwd.lean.js → reference_channels.md.DYg0CLud.lean.js} +1 -1
  97. package/dist/docs/assets/{reference_cli.md.dYCAL2lB.js → reference_cli.md.2d2Y0O-d.js} +16 -13
  98. package/dist/docs/assets/{reference_cli.md.dYCAL2lB.lean.js → reference_cli.md.2d2Y0O-d.lean.js} +1 -1
  99. package/dist/docs/assets/{reference_connections.md.DLrgAd5f.js → reference_connections.md.CxbLpaaP.js} +4 -5
  100. package/dist/docs/assets/{reference_connections.md.DLrgAd5f.lean.js → reference_connections.md.CxbLpaaP.lean.js} +1 -1
  101. package/dist/docs/assets/{reference_evals.md.D5i8PuXJ.js → reference_evals.md.Ccwp4x3o.js} +4 -4
  102. package/dist/docs/assets/{reference_evals.md.D5i8PuXJ.lean.js → reference_evals.md.Ccwp4x3o.lean.js} +1 -1
  103. package/dist/docs/assets/{reference_hooks.md.B-eGa2km.js → reference_hooks.md.DbJC8mcZ.js} +1 -1
  104. package/dist/docs/assets/reference_http-api.md.CrqhTv6S.js +11 -0
  105. package/dist/docs/assets/{reference_http-api.md.DbFNOubV.lean.js → reference_http-api.md.CrqhTv6S.lean.js} +1 -1
  106. package/dist/docs/assets/reference_playground.md.q4MI-0td.js +1 -0
  107. package/dist/docs/assets/reference_playground.md.q4MI-0td.lean.js +1 -0
  108. package/dist/docs/assets/{reference_schedules.md.BuJ8fgMa.js → reference_schedules.md.03Ryy9ca.js} +5 -5
  109. package/dist/docs/assets/{reference_schedules.md.BuJ8fgMa.lean.js → reference_schedules.md.03Ryy9ca.lean.js} +1 -1
  110. package/dist/docs/assets/reference_sessions.md.C_uzIWuy.js +1 -0
  111. package/dist/docs/assets/{reference_skills.md.ClkMoQsV.js → reference_skills.md.C2GWh7g8.js} +4 -4
  112. package/dist/docs/assets/{reference_tools.md.DzIY9JzY.js → reference_tools.md.08XR7lIl.js} +3 -14
  113. package/dist/docs/assets/reference_tools.md.08XR7lIl.lean.js +1 -0
  114. package/dist/docs/assets/{templates_grokbot-agents.md.2sydjFiO.js → templates_grokbot-agents.md.DgpPEs7B.js} +1 -1
  115. package/dist/docs/assets/troubleshooting.md.PCafNCb5.js +1 -0
  116. package/dist/docs/assets/{troubleshooting.md.x-GBa7wN.lean.js → troubleshooting.md.PCafNCb5.lean.js} +1 -1
  117. package/dist/docs/building-with-agents.html +37 -37
  118. package/dist/docs/building-with-agents.md +5 -5
  119. package/dist/docs/deployment.html +43 -41
  120. package/dist/docs/deployment.md +70 -33
  121. package/dist/docs/evals.html +38 -42
  122. package/dist/docs/evals.md +1 -16
  123. package/dist/docs/guides/agent-to-agent.html +35 -35
  124. package/dist/docs/guides/bitbucket.html +35 -35
  125. package/dist/docs/guides/cloud-agents.html +38 -39
  126. package/dist/docs/guides/cloud-agents.md +2 -8
  127. package/dist/docs/guides/convert-automation.html +35 -35
  128. package/dist/docs/guides/github.html +35 -35
  129. package/dist/docs/guides/gitlab.html +35 -35
  130. package/dist/docs/guides/grokbot-agents.html +37 -38
  131. package/dist/docs/guides/grokbot-agents.md +9 -13
  132. package/dist/docs/guides/hooks.html +37 -37
  133. package/dist/docs/guides/hooks.md +0 -1
  134. package/dist/docs/guides/improve.html +37 -38
  135. package/dist/docs/guides/improve.md +4 -6
  136. package/dist/docs/guides/jev.html +35 -35
  137. package/dist/docs/guides/mcp-oauth.html +39 -51
  138. package/dist/docs/guides/mcp-oauth.md +17 -40
  139. package/dist/docs/guides/migrate.html +35 -35
  140. package/dist/docs/guides/opentelemetry.html +35 -35
  141. package/dist/docs/guides/slack.html +35 -35
  142. package/dist/docs/guides/webhooks.html +47 -46
  143. package/dist/docs/guides/webhooks.md +35 -18
  144. package/dist/docs/hashmap.json +1 -1
  145. package/dist/docs/hillclimbing.html +35 -35
  146. package/dist/docs/index.html +36 -36
  147. package/dist/docs/index.md +1 -1
  148. package/dist/docs/llms-full.txt +388 -272
  149. package/dist/docs/llms.txt +4 -4
  150. package/dist/docs/quickstart.html +37 -37
  151. package/dist/docs/quickstart.md +2 -2
  152. package/dist/docs/reference/agent-config.html +41 -38
  153. package/dist/docs/reference/agent-config.md +26 -1
  154. package/dist/docs/reference/artifacts.html +35 -35
  155. package/dist/docs/reference/channels.html +42 -43
  156. package/dist/docs/reference/channels.md +29 -13
  157. package/dist/docs/reference/cli.html +50 -47
  158. package/dist/docs/reference/cli.md +115 -42
  159. package/dist/docs/reference/connections.html +39 -40
  160. package/dist/docs/reference/connections.md +6 -5
  161. package/dist/docs/reference/evals.html +38 -38
  162. package/dist/docs/reference/evals.md +15 -4
  163. package/dist/docs/reference/extensions.html +35 -35
  164. package/dist/docs/reference/hooks.html +37 -37
  165. package/dist/docs/reference/hooks.md +0 -1
  166. package/dist/docs/reference/http-api.html +38 -38
  167. package/dist/docs/reference/http-api.md +7 -17
  168. package/dist/docs/reference/instructions.html +35 -35
  169. package/dist/docs/reference/playground.html +37 -37
  170. package/dist/docs/reference/playground.md +1 -4
  171. package/dist/docs/reference/project-layout.html +35 -35
  172. package/dist/docs/reference/prompt.html +35 -35
  173. package/dist/docs/reference/schedules.html +39 -39
  174. package/dist/docs/reference/schedules.md +26 -3
  175. package/dist/docs/reference/sessions.html +36 -36
  176. package/dist/docs/reference/sessions.md +1 -2
  177. package/dist/docs/reference/skills.html +39 -39
  178. package/dist/docs/reference/skills.md +1 -1
  179. package/dist/docs/reference/subagents.html +35 -35
  180. package/dist/docs/reference/tools.html +39 -50
  181. package/dist/docs/reference/tools.md +2 -28
  182. package/dist/docs/templates/agentic-owners.html +35 -35
  183. package/dist/docs/templates/grokbot-agents.html +37 -37
  184. package/dist/docs/templates/grokbot-agents.md +1 -1
  185. package/dist/docs/templates/security-reviewer.html +35 -35
  186. package/dist/docs/templates/thermo-quality-review.html +35 -35
  187. package/dist/docs/templates/thermo-review.html +35 -35
  188. package/dist/docs/templates/triage.html +35 -35
  189. package/dist/docs/troubleshooting.html +36 -36
  190. package/dist/docs/troubleshooting.md +12 -7
  191. package/dist/extensions/cursor-cloud-agents/extension.d.ts +5 -1
  192. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  193. package/dist/extensions/cursor-cloud-agents/extension.js +4 -0
  194. package/dist/extensions/cursor-cloud-agents/lib/channels.d.ts.map +1 -1
  195. package/dist/extensions/cursor-cloud-agents/lib/channels.js +5 -1
  196. package/dist/filesystem.d.ts.map +1 -1
  197. package/dist/filesystem.js +4 -8
  198. package/dist/internal/cli-convert-automation.js +9 -19
  199. package/dist/internal/cli-deploy.d.ts +1 -1
  200. package/dist/internal/cli-deploy.d.ts.map +1 -1
  201. package/dist/internal/cli-deploy.js +18 -3
  202. package/dist/internal/cli-init-grokbot.d.ts +29 -0
  203. package/dist/internal/cli-init-grokbot.d.ts.map +1 -0
  204. package/dist/internal/cli-init-grokbot.js +181 -0
  205. package/dist/internal/cli-slack.js +1 -1
  206. package/dist/internal/comment-safe.d.ts +8 -0
  207. package/dist/internal/comment-safe.d.ts.map +1 -0
  208. package/dist/internal/comment-safe.js +12 -0
  209. package/dist/internal/continuation-identity.js +1 -1
  210. package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
  211. package/dist/internal/convert-automation/convert-workflow.js +2 -14
  212. package/dist/internal/convert-grokbot/answers.d.ts +127 -0
  213. package/dist/internal/convert-grokbot/answers.d.ts.map +1 -0
  214. package/dist/internal/convert-grokbot/answers.js +443 -0
  215. package/dist/internal/convert-grokbot/bot.d.ts +50 -0
  216. package/dist/internal/convert-grokbot/bot.d.ts.map +1 -0
  217. package/dist/internal/convert-grokbot/bot.js +72 -0
  218. package/dist/internal/convert-grokbot/checks.d.ts +26 -0
  219. package/dist/internal/convert-grokbot/checks.d.ts.map +1 -0
  220. package/dist/internal/convert-grokbot/checks.js +170 -0
  221. package/dist/internal/convert-grokbot/convert.d.ts +60 -0
  222. package/dist/internal/convert-grokbot/convert.d.ts.map +1 -0
  223. package/dist/internal/convert-grokbot/convert.js +470 -0
  224. package/dist/internal/convert-grokbot/handoff.d.ts +44 -0
  225. package/dist/internal/convert-grokbot/handoff.d.ts.map +1 -0
  226. package/dist/internal/convert-grokbot/handoff.js +160 -0
  227. package/dist/internal/convert-grokbot/recipe.d.ts +61 -0
  228. package/dist/internal/convert-grokbot/recipe.d.ts.map +1 -0
  229. package/dist/internal/convert-grokbot/recipe.js +94 -0
  230. package/dist/internal/convert-grokbot/routine.d.ts +51 -0
  231. package/dist/internal/convert-grokbot/routine.d.ts.map +1 -0
  232. package/dist/internal/convert-grokbot/routine.js +128 -0
  233. package/dist/internal/convert-grokbot/slack.d.ts +28 -0
  234. package/dist/internal/convert-grokbot/slack.d.ts.map +1 -0
  235. package/dist/internal/convert-grokbot/slack.js +50 -0
  236. package/dist/internal/deploy-client.d.ts +0 -2
  237. package/dist/internal/deploy-client.d.ts.map +1 -1
  238. package/dist/internal/deploy-client.js +2 -11
  239. package/dist/internal/discovery/agent-config.d.ts +6 -0
  240. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  241. package/dist/internal/discovery/agent-config.js +19 -0
  242. package/dist/internal/discovery/agent.d.ts.map +1 -1
  243. package/dist/internal/discovery/agent.js +2 -1
  244. package/dist/internal/discovery/names.d.ts +2 -0
  245. package/dist/internal/discovery/names.d.ts.map +1 -1
  246. package/dist/internal/discovery/names.js +2 -0
  247. package/dist/internal/discovery/project.d.ts.map +1 -1
  248. package/dist/internal/discovery/project.js +1 -3
  249. package/dist/internal/eval-judge-model.d.ts +10 -5
  250. package/dist/internal/eval-judge-model.d.ts.map +1 -1
  251. package/dist/internal/eval-judge-model.js +36 -25
  252. package/dist/internal/filesystem/subagent-inherit.d.ts +39 -0
  253. package/dist/internal/filesystem/subagent-inherit.d.ts.map +1 -0
  254. package/dist/internal/filesystem/subagent-inherit.js +96 -0
  255. package/dist/internal/filesystem/tools.d.ts +6 -0
  256. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  257. package/dist/internal/filesystem/tools.js +38 -1
  258. package/dist/internal/hosted-catch-protocol.d.ts +2 -0
  259. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  260. package/dist/internal/hosted-catch-protocol.js +2 -0
  261. package/dist/internal/hosted-catch.d.ts +2 -3
  262. package/dist/internal/hosted-catch.d.ts.map +1 -1
  263. package/dist/internal/hosted-catch.js +2 -3
  264. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  265. package/dist/internal/hosted-delivery.js +46 -13
  266. package/dist/internal/hosted-execution-flush.d.ts +6 -3
  267. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  268. package/dist/internal/hosted-execution-flush.js +28 -31
  269. package/dist/internal/hosting.d.ts +1 -1
  270. package/dist/internal/hosting.d.ts.map +1 -1
  271. package/dist/internal/hosting.js +7 -3
  272. package/dist/internal/init-interview.d.ts +3 -5
  273. package/dist/internal/init-interview.d.ts.map +1 -1
  274. package/dist/internal/init-interview.js +15 -88
  275. package/dist/internal/init-project.d.ts +13 -0
  276. package/dist/internal/init-project.d.ts.map +1 -1
  277. package/dist/internal/init-project.js +30 -37
  278. package/dist/internal/init-scaffold.d.ts +11 -0
  279. package/dist/internal/init-scaffold.d.ts.map +1 -1
  280. package/dist/internal/init-scaffold.js +47 -13
  281. package/dist/internal/interview/agent-questions.d.ts +19 -0
  282. package/dist/internal/interview/agent-questions.d.ts.map +1 -0
  283. package/dist/internal/interview/agent-questions.js +120 -0
  284. package/dist/internal/interview/question.d.ts +82 -0
  285. package/dist/internal/interview/question.d.ts.map +1 -0
  286. package/dist/internal/interview/question.js +198 -0
  287. package/dist/internal/local-control-plane.d.ts.map +1 -1
  288. package/dist/internal/local-control-plane.js +5 -1
  289. package/dist/internal/otel/collector.d.ts +2 -0
  290. package/dist/internal/otel/collector.d.ts.map +1 -1
  291. package/dist/internal/otel/collector.js +4 -0
  292. package/dist/internal/peer-connections.d.ts +6 -2
  293. package/dist/internal/peer-connections.d.ts.map +1 -1
  294. package/dist/internal/peer-connections.js +23 -19
  295. package/dist/internal/resolve-prod-target.d.ts.map +1 -1
  296. package/dist/internal/resolve-prod-target.js +2 -1
  297. package/dist/internal/sdk-runner.d.ts.map +1 -1
  298. package/dist/internal/sdk-runner.js +43 -16
  299. package/dist/internal/sdk-subagent-inherit-support.d.ts +9 -0
  300. package/dist/internal/sdk-subagent-inherit-support.d.ts.map +1 -0
  301. package/dist/internal/sdk-subagent-inherit-support.js +89 -0
  302. package/dist/internal/server.d.ts.map +1 -1
  303. package/dist/internal/server.js +6 -5
  304. package/dist/internal/session-engine.d.ts +13 -0
  305. package/dist/internal/session-engine.d.ts.map +1 -1
  306. package/dist/internal/session-engine.js +62 -11
  307. package/dist/internal/session-run-log.d.ts.map +1 -1
  308. package/dist/internal/session-run-log.js +26 -11
  309. package/dist/internal/{convert-automation/slug.d.ts → slug.d.ts} +4 -1
  310. package/dist/internal/slug.d.ts.map +1 -0
  311. package/dist/internal/{convert-automation/slug.js → slug.js} +11 -1
  312. package/dist/playground/assets/index-7fVUOA5l.css +1 -0
  313. package/dist/playground/assets/{index-ClxRl2Cw.js → index-U3TRnwAP.js} +43 -43
  314. package/dist/playground/index.html +2 -2
  315. package/dist/types.d.ts +26 -1
  316. package/dist/types.d.ts.map +1 -1
  317. package/docs/README.md +1 -1
  318. package/docs/building-with-agents.md +5 -5
  319. package/docs/deployment.md +70 -33
  320. package/docs/evals.md +1 -16
  321. package/docs/guides/cloud-agents.md +3 -9
  322. package/docs/guides/grokbot-agents.md +10 -14
  323. package/docs/guides/hooks.md +0 -1
  324. package/docs/guides/improve.md +4 -6
  325. package/docs/guides/mcp-oauth.md +18 -41
  326. package/docs/guides/webhooks.md +35 -18
  327. package/docs/quickstart.md +2 -2
  328. package/docs/reference/agent-config.md +26 -1
  329. package/docs/reference/channels.md +29 -13
  330. package/docs/reference/cli.md +115 -42
  331. package/docs/reference/connections.md +6 -5
  332. package/docs/reference/evals.md +15 -4
  333. package/docs/reference/hooks.md +0 -1
  334. package/docs/reference/http-api.md +7 -17
  335. package/docs/reference/playground.md +2 -5
  336. package/docs/reference/schedules.md +26 -3
  337. package/docs/reference/sessions.md +1 -2
  338. package/docs/reference/skills.md +1 -1
  339. package/docs/reference/tools.md +3 -29
  340. package/docs/templates/grokbot-agents.md +1 -1
  341. package/docs/troubleshooting.md +12 -7
  342. package/package.json +36 -35
  343. package/schemas/grokbot-answers.schema.json +343 -0
  344. package/skills/create-agent/SKILL.md +16 -11
  345. package/skills/debug/SKILL.md +3 -4
  346. package/skills/evals/SKILL.md +2 -2
  347. package/skills/framework-map/SKILL.md +10 -10
  348. package/skills/mcp-auth/SKILL.md +10 -34
  349. package/skills/migrate-v2/SKILL.md +13 -9
  350. package/skills/setup-slack/SKILL.md +0 -13
  351. package/templates/agentic-owners/bot/lib/owners/handles.ts +1 -1
  352. package/templates/agentic-owners/bot/lib/owners/matching.ts +20 -9
  353. package/templates/agents-md/README.md +3 -3
  354. package/templates/agents-md/bot/channels/queue.ts +3 -8
  355. package/templates/agents-md/bot/instructions.md +1 -2
  356. package/templates/agents-md/bot/tools/apply_agents.ts +0 -1
  357. package/templates/agents-md/evals/agents.eval.ts +2 -2
  358. package/templates/demo/bot/channels/queue.ts +5 -15
  359. package/templates/grokbot-agents/.gitignore +4 -0
  360. package/templates/pr-autofixer/bot/channels/drive.ts +3 -16
  361. package/templates/security-help/.gitignore +4 -0
  362. package/templates/triage/bot/channels/queue.ts +11 -22
  363. package/templates/triage/bot/channels/webhook.ts +3 -6
  364. package/templates/triage/bot/lib/parse-queue-event.ts +0 -6
  365. package/dist/docs/assets/chunks/@localSearchIndexroot.CzrtdJ8s.js +0 -1
  366. package/dist/docs/assets/chunks/channel.6ebHhoF9.js +0 -1
  367. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BJ-CwKwu.js +0 -1
  368. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BJ-CwKwu.js +0 -1
  369. package/dist/docs/assets/chunks/clone.DfV2fkWH.js +0 -1
  370. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DNdUCJyd.js +0 -1
  371. package/dist/docs/assets/chunks/wardley-RL74JXVD.C46G0P5a.js +0 -162
  372. package/dist/docs/assets/deployment.md.BYuEcDBv.js +0 -29
  373. package/dist/docs/assets/guides_cloud-agents.md.CWJjS9No.js +0 -10
  374. package/dist/docs/assets/guides_cloud-agents.md.CWJjS9No.lean.js +0 -1
  375. package/dist/docs/assets/guides_grokbot-agents.md.tD1smFhU.js +0 -16
  376. package/dist/docs/assets/guides_mcp-oauth.md.DR3zhC9r.lean.js +0 -1
  377. package/dist/docs/assets/reference_channels.md.LbNIJBwd.js +0 -23
  378. package/dist/docs/assets/reference_http-api.md.DbFNOubV.js +0 -11
  379. package/dist/docs/assets/reference_playground.md.1hx0gcIu.js +0 -1
  380. package/dist/docs/assets/reference_playground.md.1hx0gcIu.lean.js +0 -1
  381. package/dist/docs/assets/reference_sessions.md.CyM7ARz1.js +0 -1
  382. package/dist/docs/assets/reference_tools.md.DzIY9JzY.lean.js +0 -1
  383. package/dist/docs/assets/troubleshooting.md.x-GBa7wN.js +0 -1
  384. package/dist/internal/convert-automation/slug.d.ts.map +0 -1
  385. package/dist/playground/assets/index-BKSsuEMw.css +0 -1
  386. /package/dist/docs/assets/{guides_hooks.md.5Ce3NXxZ.lean.js → guides_hooks.md.B_bKG1oA.lean.js} +0 -0
  387. /package/dist/docs/assets/{index.md.Dxxr7pFa.lean.js → index.md.BIBHIQtU.lean.js} +0 -0
  388. /package/dist/docs/assets/{quickstart.md.BK5gjHM2.lean.js → quickstart.md.CduLGBAB.lean.js} +0 -0
  389. /package/dist/docs/assets/{reference_hooks.md.B-eGa2km.lean.js → reference_hooks.md.DbJC8mcZ.lean.js} +0 -0
  390. /package/dist/docs/assets/{reference_sessions.md.CyM7ARz1.lean.js → reference_sessions.md.C_uzIWuy.lean.js} +0 -0
  391. /package/dist/docs/assets/{reference_skills.md.ClkMoQsV.lean.js → reference_skills.md.C2GWh7g8.lean.js} +0 -0
  392. /package/dist/docs/assets/{templates_grokbot-agents.md.2sydjFiO.lean.js → templates_grokbot-agents.md.DgpPEs7B.lean.js} +0 -0
@@ -15,9 +15,8 @@ it does not move this agent onto a Grok Bot runtime.
15
15
 
16
16
  ## Mount it
17
17
 
18
- List the bots your agent may contact and decide whether each new message
19
- needs approval. Descriptions teach the model when to choose one bot over
20
- another.
18
+ List the bots your agent may contact. Descriptions teach the model when
19
+ to choose one bot over another.
21
20
 
22
21
  ```ts
23
22
  // bot/extensions/grokbot.ts
@@ -34,7 +33,6 @@ export default cursorGrokBotAgents({
34
33
  description: "Routes work and tracks priorities.",
35
34
  },
36
35
  ],
37
- needsApproval: true,
38
36
  });
39
37
  ```
40
38
 
@@ -51,8 +49,8 @@ bdk init ./grokbot --template grokbot-agents
51
49
  ## Ask a named bot
52
50
 
53
51
  When someone says, "Ask Plan Keeper whether we should move the picnic,"
54
- your agent prepares one self-contained message, requests approval, and
55
- waits for the bot's delivered reply. That reply appears in the current
52
+ your agent prepares one self-contained message, sends it, and waits for
53
+ the bot's delivered reply. That reply appears in the current
56
54
  conversation as the consultation result.
57
55
 
58
56
  The message must include who is asking, the relevant facts, and the
@@ -89,9 +87,9 @@ existing memory.
89
87
  > Stop Plan Keeper's current turn. Then ask it to compare indoor venues
90
88
  > instead of changing the time.
91
89
 
92
- Only `ask` uses `needsApproval`. `check` and `interrupt` execute without
93
- an approval card, so expose this extension only to callers who may read
94
- or stop those bot conversations.
90
+ `check` and `interrupt` act on the bot conversation directly, so expose
91
+ this extension only to callers who may read or stop those
92
+ conversations.
95
93
 
96
94
  ## Configure it
97
95
 
@@ -100,8 +98,8 @@ list is refused, but a misspelled configured name may create a new empty
100
98
  bot on first use. If a result says `created: true`, tell the person and
101
99
  check the name before sending more work.
102
100
 
103
- With no `agents` list, any name is allowed and approval defaults on.
104
- Prefer an explicit list for a shared agent. `list` returns configured
101
+ With no `agents` list, any name is allowed. Prefer an explicit list for
102
+ a shared agent. `list` returns configured
105
103
  bots and bots this caller already contacted; it does not enumerate the
106
104
  whole account.
107
105
 
@@ -139,6 +137,4 @@ directory and disable that tool. See
139
137
  ## What's next
140
138
 
141
139
  - [Extensions](../reference/extensions.md): namespaces, trust, and
142
- overlays
143
- - [Tool approvals](../reference/tools.md#gate-a-tool-on-human-approval):
144
- approve asks
140
+ overlays
@@ -98,7 +98,6 @@ replay recorded events into hooks.
98
98
  | --- | --- |
99
99
  | Add context before the model | `instructions.md`, skills, or `workspaceFiles` |
100
100
  | Deliver to Slack or a PR | Channel [`events`](../reference/channels.md#events) or packs |
101
- | Block or approve a tool | [`needsApproval`](../reference/tools.md#gate-a-tool-on-human-approval) |
102
101
  | Gate final assistant text | `defineResult` |
103
102
  | Gate behavior | [Evals](../evals.md) |
104
103
 
@@ -15,9 +15,8 @@ deployed.
15
15
 
16
16
  ## Mount it
17
17
 
18
- Mount Cloud agents with the agent's own repository allowlisted, keep
19
- launch approval explicit, then mount `improve` with the source
20
- directory.
18
+ Mount Cloud agents with the agent's own repository allowlisted, then
19
+ mount `improve` with the source directory.
21
20
 
22
21
  ```ts
23
22
  // bot/extensions/cloud.ts
@@ -33,7 +32,6 @@ export default cursorCloudAgents({
33
32
  ],
34
33
  autoCreatePR: true,
35
34
  },
36
- needsApproval: true,
37
35
  });
38
36
  ```
39
37
 
@@ -68,8 +66,8 @@ a narrow behavior request into an unrelated refactor.
68
66
 
69
67
  ## Follow the source change
70
68
 
71
- The agent requests approval and launches one cloud agent on the
72
- configured repository and ref. It reports the complete cloud-agent ID
69
+ The agent launches one cloud agent on the configured repository and
70
+ ref. It reports the complete cloud-agent ID
73
71
  and URL immediately, then checks the same run instead of launching
74
72
  another agent for follow-up work.
75
73
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Host MCP OAuth"
3
- description: "Authorize a private MCP server locally, constrain its tools, and carry its credentials onto a hosted agent."
3
+ description: "Authorize a private MCP server locally, constrain its tools, and choose where its credentials live."
4
4
  ---
5
5
 
6
6
  # Connect a private MCP server with OAuth
@@ -48,9 +48,7 @@ retries and the turn continues without restarting the agent.
48
48
  bdk serve --dir . --dev
49
49
  ```
50
50
 
51
- Connect authorizes the process that is running now. It does not seed
52
- credentials for a future hosted replacement; use `--store` for that
53
- separate outcome.
51
+ Connect authorizes the process that is running now.
54
52
 
55
53
  ## Keep privileged tools behind a wrapper
56
54
 
@@ -96,43 +94,22 @@ export default defineTool({
96
94
  ```
97
95
 
98
96
  The model sees `get_stock`, not the unrestricted inventory server.
99
- Use this shape when code should own an allowlist, approval, or other
100
- side-effect gate.
97
+ Use this shape when code should own an allowlist or another side-effect
98
+ gate.
101
99
 
102
- ## Keep OAuth across hosted replacements
100
+ ## Use an OAuth server from a hosted agent
103
101
 
104
- Declare the server's egress domain and the OAuth secret names, authorize
105
- from a signed-in machine, then store the credentials and redeploy. The
106
- next hosted process can reconnect without opening a browser.
102
+ Tokens from `mcp oauth` stay in the CLI config directory of the machine
103
+ that authorized them, so a hosted deployment doesn't receive them. For a
104
+ Cursor-managed agent, add the server under MCP in the Cursor dashboard,
105
+ reach it through a
106
+ [`cursorAccount: true` connection](../reference/connections.md#cursor-account-mcp-connection),
107
+ and connect it from **Deployed Agents** in the
108
+ [dashboard](https://cursor.com/dashboard).
107
109
 
108
- ```ts
109
- // bot/agent.ts
110
- export default defineAgent({
111
- hosting: {
112
- egressDomains: ["mcp.example.com"],
113
- secretNames: [
114
- "MCP_OAUTH_INVENTORY_ACCESS_TOKEN",
115
- "MCP_OAUTH_INVENTORY_REFRESH_TOKEN",
116
- "MCP_OAUTH_INVENTORY_CLIENT_ID",
117
- ],
118
- },
119
- });
120
- ```
121
-
122
- ```text
123
- bdk mcp oauth inventory --store
124
- bdk secrets list my-agent
125
- bdk deploy
126
- ```
127
-
128
- `--store` writes deployment secrets; it does not restart the current
129
- process. Follow the CLI or dashboard prompt to redeploy, then exercise
130
- the hosted agent.
131
-
132
- These credentials belong to the deployment, not to the person who
133
- clicked Connect. Anyone able to use that agent can reach the MCP
134
- capabilities you expose, so keep privileged servers host-only or narrow
135
- their tool list.
110
+ Anyone able to use that agent can reach the MCP capabilities you
111
+ expose, so narrow the connection's `servers` list and keep privileged
112
+ operations behind a host-side wrapper.
136
113
 
137
114
  ## Choose where credentials live
138
115
 
@@ -141,8 +118,8 @@ Use the credential shape that matches who should own access:
141
118
  - Choose `cursorAccount: true` for connectors already authorized under
142
119
  MCP in the Cursor dashboard. Their tokens stay on the Cursor backend.
143
120
 
144
- - Choose `url` with `oauth: true` when the serve host or hosted
145
- deployment should hold OAuth credentials.
121
+ - Choose `url` with `oauth: true` when the machine running `bdk serve`
122
+ should hold OAuth credentials.
146
123
 
147
124
  - Choose `url` with static `headers` when the server uses an API key or
148
125
  bearer token instead of OAuth.
@@ -159,6 +136,6 @@ caller needs a different downstream identity.
159
136
  connectors, per-session auth, and tool filtering
160
137
  - [CLI reference](../reference/cli.md#mcp-oauth): OAuth command flags
161
138
  and browser callback behavior
162
- - [Deployment](../deployment.md): hosted secrets and egress
139
+ - [Deployment](../deployment.md): hosted egress and secrets
163
140
  - [Troubleshooting](../troubleshooting.md): authorization symptoms and
164
141
  remedies
@@ -16,9 +16,9 @@ Author `bot/channels/<id>.ts`. Its routes mount under
16
16
  ## Receive a webhook and send the answer back
17
17
 
18
18
  When a ticket system sends a new message, this endpoint responds with
19
- `202 Accepted` right away. The agent keeps working after the HTTP
20
- request ends, and its completed answer appears as a comment on the
21
- ticket.
19
+ `202 Accepted` and an empty body right away. The agent keeps working
20
+ after the HTTP request ends, and its completed answer appears as a
21
+ comment on the ticket.
22
22
 
23
23
  ```ts
24
24
  // bot/channels/tickets.ts
@@ -46,7 +46,7 @@ export default defineChannel<TicketState>({
46
46
  title: `Ticket ${body.ticketId}`,
47
47
  })
48
48
  );
49
- return Response.json({ accepted: true }, { status: 202 });
49
+ return new Response(null, { status: 202 });
50
50
  },
51
51
  }),
52
52
  ],
@@ -65,6 +65,12 @@ export default defineChannel<TicketState>({
65
65
  SDK. Keeping that write in the event handler means the webhook request
66
66
  does not stay open while the model works.
67
67
 
68
+ The caller only ever receives that empty `202`. On Cursor-managed
69
+ hosting, the deployment sends it before your handler runs and discards
70
+ whatever the handler returns, so deliver every result, including
71
+ failures, back through the provider's API. See
72
+ [Route responses](../reference/channels.md#route-responses).
73
+
68
74
  ## Keep one conversation per ticket
69
75
 
70
76
  Without a conversation key, every delivery creates a new session. Add
@@ -98,10 +104,11 @@ handler: async (_request, { callTool, send, waitUntil, body }) => {
98
104
  ticketId: body.ticketId,
99
105
  });
100
106
  if (prepared.isError) {
101
- return Response.json(
102
- { error: prepared.errorMessage ?? "Could not prepare ticket" },
103
- { status: 502 }
107
+ await postTicketComment(
108
+ body.ticketId,
109
+ "I couldn't load this ticket, so I didn't draft a reply."
104
110
  );
111
+ return new Response(null, { status: 202 });
105
112
  }
106
113
 
107
114
  waitUntil(
@@ -113,17 +120,19 @@ handler: async (_request, { callTool, send, waitUntil, body }) => {
113
120
  },
114
121
  })
115
122
  );
116
- return Response.json({ accepted: true }, { status: 202 });
123
+ return new Response(null, { status: 202 });
117
124
  },
118
125
  ```
119
126
 
120
127
  The same `message.completed` handler from the first example delivers
121
- the answer back to the ticket.
128
+ the answer back to the ticket. When preparation fails, the handler
129
+ reports that on the ticket instead.
122
130
 
123
131
  ## Routes receive, events deliver
124
132
 
125
133
  Routes own inbound HTTP. A route validates the request, decides whether
126
- to start or resume a turn, and responds to the caller. The channel's
134
+ to start or resume a turn, and acknowledges the caller with `202`. The
135
+ channel's
127
136
  `events` handlers receive session events later, which is where you
128
137
  deliver the model's answer or report a failure to the originating
129
138
  system.
@@ -151,9 +160,10 @@ route:
151
160
  - `callTool` runs an authored server tool without starting a model
152
161
  turn.
153
162
 
154
- - `waitUntil` keeps background work alive after the HTTP response. Await
155
- `send` when the caller needs the session handle, then call
156
- `session.waitForCompletion()` if it also needs the turn outcome.
163
+ - `waitUntil` keeps background work alive after the handler returns.
164
+ Await `send` when later handler code needs the session handle, such
165
+ as calling `session.waitForCompletion()` before reporting the turn
166
+ outcome to the provider.
157
167
 
158
168
  - `host` provides authenticated services for API calls made by channel
159
169
  code.
@@ -189,17 +199,24 @@ export default defineChannel({
189
199
  const rawBody = await request.text();
190
200
  const signature = request.headers.get("x-provider-signature");
191
201
  if (!verifyProviderSignature(rawBody, signature)) {
192
- return Response.json({ ok: false }, { status: 401 });
202
+ return new Response(null, { status: 202 });
193
203
  }
194
204
 
195
205
  // Parse and dispatch only after the signature passes.
196
- return Response.json({ ok: true });
206
+ return new Response(null, { status: 202 });
197
207
  },
198
208
  }),
199
209
  ],
200
210
  });
201
211
  ```
202
212
 
213
+ Because a hosted handler runs after the `202`, a delivery with a bad
214
+ signature is dropped silently rather than rejected. When the provider
215
+ sends a shared secret header or signs the raw body with HMAC-SHA256,
216
+ use `sharedSecretAuth()` or `hmacSignatureAuth()` instead. Hosting
217
+ checks those policies before the handler runs and answers a bad
218
+ delivery with `401`.
219
+
203
220
  `publicEndpoint()` only opens this channel's routes. The built-in
204
221
  session and tool APIs stay private. See
205
222
  [Auth policies](../reference/channels.md#auth-policies) for bearer
@@ -208,9 +225,9 @@ tokens and the complete policy reference.
208
225
  ## Test locally
209
226
 
210
227
  Run the agent in development mode, then replay the same payload the
211
- provider will send. The response should return immediately, and the
212
- resulting session should appear in the playground while the reply is
213
- delivered.
228
+ provider will send. The route should answer `202` with an empty body
229
+ right away, and the resulting session should appear in the playground
230
+ while the reply is delivered.
214
231
 
215
232
  ```text
216
233
  bdk serve --dir . --dev
@@ -304,8 +304,8 @@ trigger, both tool calls, and the verdict.
304
304
 
305
305
  - [Evals](./evals.md): freeze these two PRs as regression checks so
306
306
  prompt changes can't flip a verdict
307
- - [Tools](./reference/tools.md): more on typed tools, approvals, and
308
- direct calls
307
+ - [Tools](./reference/tools.md): more on typed tools, dry-run effects,
308
+ and direct calls
309
309
  - [GitHub](./guides/github.md): fixtures, forwarding, and pulling
310
310
  events from Cursor
311
311
  - [Building agents with agents](./building-with-agents.md): have a
@@ -32,7 +32,8 @@ export default defineAgent({
32
32
  | `description` | string | What the agent is for. Required on subagents; the parent model reads it to decide when to delegate. Documentation-only on the root. |
33
33
  | `instructions` | string | Inline instructions. Prefer `instructions.md`; this exists for subagents and generated configs. |
34
34
  | `local` | `{ cwd?, workspaceDir?, sandbox? }` | Local harness defaults. See [Local options](#local-options). |
35
- | `hosting` | `{ egressDomains?, secretNames? }` | Managed-hosting declarations read by `bdk deploy`: the deployment's egress allowlist and the secret names the agent expects. Mounted [extensions](./extensions.md#build-an-extension) add their own. Ignored by local serving. |
35
+ | `persistent` | boolean | Keep one long-lived runtime for the hosted deployment. Defaults to `false`. See [Persistent hosting](#persistent-hosting). |
36
+ | `hosting` | `{ egressDomains?, secretNames?, image? }` | Managed-hosting declarations read by `bdk deploy`: the deployment's egress allowlist, the secret names the agent expects, and a container image for a [persistent agent](#persistent-hosting). Mounted [extensions](./extensions.md#build-an-extension) add their own. Ignored by local serving. |
36
37
  | `concurrency` | `{ maxRunningTurns? }` | Agent-wide concurrent turn limit. See [Concurrency](#concurrency). |
37
38
  | `builtinTools` | `{ reminders? }` | Framework-provided model-facing tools, opted in per capability. See [Built-in tools](#built-in-tools). |
38
39
  | `tools` | `ToolName[]` | Allowlist of built-in harness tools offered to the model. Unset = the model's full standard toolset. See [Harness tools](#harness-tools). |
@@ -89,6 +90,30 @@ does not leak rules, skills, or MCP servers into the turn. A standalone git
89
90
  root keeps the in-project session workspace. Point `cwd` at a checkout only
90
91
  when the agent should inherit that tree.
91
92
 
93
+ ## Persistent hosting
94
+
95
+ By default, a hosted deployment starts a runtime when an event arrives
96
+ and stops it when the work ends. Set `persistent: true` to keep one
97
+ long-lived runtime for the deployment instead, with its state directory
98
+ on the runtime's own disk. On a redeploy, the new version starts beside
99
+ the old one on the same state, and the old version stops after the new
100
+ one takes over. Each team can have one persistent deployment. Local
101
+ serving ignores the flag.
102
+
103
+ ```ts
104
+ export default defineAgent({
105
+ persistent: true,
106
+ hosting: { image: "incident-bot-base" },
107
+ });
108
+ ```
109
+
110
+ `hosting.image` names a container image that your team pushed with
111
+ `bdk images push`. The agent runs inside that image instead of the
112
+ default Node 22 image. Only persistent agents can use it, and `deploy`
113
+ rejects `hosting.image` on any other agent. A deploy pins the image it
114
+ finds, so after you push a new image under the same name, deploy again
115
+ to pick it up.
116
+
92
117
  ## Harness tools
93
118
 
94
119
  Use `tools` to limit which built-in Cursor harness tools the model can
@@ -12,8 +12,8 @@ available alongside any custom or prebuilt channels.
12
12
 
13
13
  ## Built-in HTTP channel
14
14
 
15
- The built-in channel serves the session, approval, tool, discovery, and
16
- health routes. In a multi-agent host, each agent's routes sit under its
15
+ The built-in channel serves the session, tool, and discovery routes. In
16
+ a multi-agent host, each agent's routes sit under its
17
17
  slug. See the [HTTP API](./http-api.md) for request and response
18
18
  contracts.
19
19
 
@@ -33,14 +33,13 @@ export default defineChannel({
33
33
  message: z.string(),
34
34
  prUrl: z.string().url(),
35
35
  }),
36
- handler: async (_request, { send, body }) => {
37
- const session = await send(
38
- `${body.message}\n\nPull request: ${body.prUrl}`,
39
- {
36
+ handler: async (_request, { send, waitUntil, body }) => {
37
+ waitUntil(
38
+ send(`${body.message}\n\nPull request: ${body.prUrl}`, {
40
39
  continuationToken: `pr:${body.prUrl}`,
41
- }
40
+ })
42
41
  );
43
- return Response.json({ sessionId: session.id });
42
+ return new Response(null, { status: 202 });
44
43
  },
45
44
  }),
46
45
  ],
@@ -51,6 +50,23 @@ The route above is
51
50
  `POST /v1/channels/<id>/review`. Calls for the same pull request reuse
52
51
  one conversation because they pass the same continuation token.
53
52
 
53
+ ## Route responses
54
+
55
+ A custom route acknowledges the caller and nothing more. On
56
+ Cursor-managed hosting, the deployment answers every custom route with
57
+ `202 Accepted` and an empty body as soon as the request arrives, then
58
+ runs the handler. The caller never receives the handler's `Response`,
59
+ so a route can't return a session ID, a computed result, or an error
60
+ status. Requests rejected before the handler runs, such as a missing
61
+ alias token or a failed `sharedSecretAuth` or `hmacSignatureAuth`
62
+ check, still get `401`.
63
+
64
+ Deliver results through the channel's [`events`](#events) handlers, a
65
+ callback to the system that sent the request, or a tool the turn calls.
66
+ Local `serve` passes the handler's response through, so return
67
+ `new Response(null, { status: 202 })` to keep local calls matching
68
+ hosted ones.
69
+
54
70
  ## Route verbs and schemas
55
71
 
56
72
  Route paths must begin with `/`. The method helper determines which Zod
@@ -64,8 +80,9 @@ schemas the route accepts:
64
80
 
65
81
  Plain JSON Schema objects don't type-check. Use `z.object({})` or
66
82
  `z.unknown()` for an open surface. The host validates the body and query
67
- before calling the handler, returning `400` on failure; an empty body is
68
- read as `{}`. Declared schemas also appear in `GET /v1/info` for
83
+ before calling the handler, and an empty body is read as `{}`. A request
84
+ that fails validation never reaches the handler; local `serve` answers it
85
+ with `400`, while a hosted caller has already received its `202`. Declared schemas also appear in `GET /v1/info` for
69
86
  playground requests and slash commands.
70
87
 
71
88
  ## Handler arguments
@@ -82,7 +99,7 @@ Each handler receives the Fetch `Request` and a typed arguments object.
82
99
  | `auth` | The `AuthContext` returned by the route's auth chain |
83
100
  | `requestIp` | The TCP peer address, or `null` |
84
101
  | `host` | Shared MCP, provider, storage, telemetry, and reminder services |
85
- | `waitUntil(promise)` | Track work after the response returns |
102
+ | `waitUntil(promise)` | Keep work running after the handler returns |
86
103
  | `sessionUrls(request, sessionId)` | Build absolute playground and trace URLs for this mount |
87
104
  | `artifacts` | List or tag [artifacts](./artifacts.md); pass `sessionId` when attributing one |
88
105
 
@@ -134,7 +151,6 @@ transport controls:
134
151
  | `hasContinuationSession(token)` | Check whether a token maps to a session |
135
152
  | `isContinuationBusy(token)` | Check whether a turn is active for a token |
136
153
  | `interruptContinuation(token)` | Stop the active turn and clear queued coalesced follow-ups |
137
- | `resolveApproval(...)` | Approve or deny a parked tool call |
138
154
 
139
155
  ## Auth policies
140
156
 
@@ -173,7 +189,7 @@ author their own chain, and `--allow-anonymous` swaps it for
173
189
 
174
190
  | Import | Function | Surface |
175
191
  | --- | --- | --- |
176
- | `@cursor/bdk/channels/slack` | `slackChannel()` | Slack messages, threads, streaming replies, and approvals. See [Slack](../guides/slack.md) |
192
+ | `@cursor/bdk/channels/slack` | `slackChannel()` | Slack messages, threads, and streaming replies. See [Slack](../guides/slack.md) |
177
193
  | `@cursor/bdk/channels/github` | `githubChannel()` | GitHub and GitHub Enterprise webhooks. See [GitHub](../guides/github.md) |
178
194
  | `@cursor/bdk/channels/gitlab` | `gitlabChannel()` | GitLab.com and self-managed GitLab hooks. See [GitLab](../guides/gitlab.md) |
179
195
  | `@cursor/bdk/channels/bitbucket` | `bitbucketChannel()` | Bitbucket Cloud and Data Center hooks. See [Bitbucket](../guides/bitbucket.md) |