@cursor/bdk 0.2.14 → 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 (294) 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.BN3sgOOo.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.CbA00dML.js → VPLocalSearchBox.C4BiQe53.js} +1 -1
  24. package/dist/docs/assets/chunks/{arc.Byug8CZM.js → arc.D1TA2Mxn.js} +1 -1
  25. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.D1_qmnQy.js → architectureDiagram-Q4EWVU46.CA-hBJCN.js} +1 -1
  26. package/dist/docs/assets/chunks/{baseUniq.Dj-Nurf-.js → baseUniq.CzsSgiab.js} +1 -1
  27. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.BZwq3EIg.js → blockDiagram-DXYQGD6D.sxrH_f0l.js} +1 -1
  28. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.dx75urO7.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.CIoddsDQ.js → chunk-4BX2VUAB.BS6_uTUf.js} +1 -1
  31. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.O3VsVBES.js → chunk-4TB4RGXK.D-URAeTU.js} +1 -1
  32. package/dist/docs/assets/chunks/{chunk-55IACEB6.WNNWh0Pe.js → chunk-55IACEB6.b4SZc5kO.js} +1 -1
  33. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.BKVQwEME.js → chunk-EDXVE4YY.DLKEEDkN.js} +1 -1
  34. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.Cv5iBz7A.js → chunk-FMBD7UC4.3SyQHgpY.js} +1 -1
  35. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.wCDCToee.js → chunk-OYMX7WX6.DBKKaFeS.js} +1 -1
  36. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.D3IGXhXA.js → chunk-QZHKN3VN.BhCYeR7H.js} +1 -1
  37. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.CAPPh-E7.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.BQCFH3M5.js → cose-bilkent-S5V4N54A.4q0YNZN6.js} +1 -1
  42. package/dist/docs/assets/chunks/{dagre-KV5264BT.lHmdrh7L.js → dagre-KV5264BT.Bk_CcQPr.js} +1 -1
  43. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.EtSPnHgD.js → diagram-5BDNPKRD.CgreoM_Z.js} +1 -1
  44. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.DCyUnQT8.js → diagram-G4DWMVQ6.DlZGpm6W.js} +1 -1
  45. package/dist/docs/assets/chunks/{diagram-MMDJMWI5._E0Qqblb.js → diagram-MMDJMWI5.BxtXxgIR.js} +1 -1
  46. package/dist/docs/assets/chunks/{diagram-TYMM5635.BDj4oyy_.js → diagram-TYMM5635.DSzlJp2D.js} +1 -1
  47. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.CrvnO6a3.js → erDiagram-SMLLAGMA.BN1YUmEV.js} +1 -1
  48. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.DIhYc-2F.js → flowDiagram-DWJPFMVM.B61NGNYu.js} +1 -1
  49. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.hFqm_vio.js → ganttDiagram-T4ZO3ILL.DR-tto3M.js} +1 -1
  50. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.N3GDaVDD.js → gitGraphDiagram-UUTBAWPF.CBPs2W_2.js} +1 -1
  51. package/dist/docs/assets/chunks/{graph.DK28rMBx.js → graph.DmlaqzCE.js} +1 -1
  52. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.DHmE6W9M.js → infoDiagram-42DDH7IO.obPv-fFg.js} +1 -1
  53. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.ByUJuOYm.js → ishikawaDiagram-UXIWVN3A.CXHTUcM3.js} +1 -1
  54. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BIUChFMh.js → journeyDiagram-VCZTEJTY.BoVHerYZ.js} +1 -1
  55. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CNgFXwo-.js → kanban-definition-6JOO6SKY.CfYmPHZg.js} +1 -1
  56. package/dist/docs/assets/chunks/{layout.BDnwE4ET.js → layout.621UdAhB.js} +1 -1
  57. package/dist/docs/assets/chunks/{linear.DmrYLXFs.js → linear.Cz_zRKjr.js} +1 -1
  58. package/dist/docs/assets/chunks/{min.BbYcWakN.js → min.ON4GjCH7.js} +1 -1
  59. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.C9x-klkv.js → mindmap-definition-QFDTVHPH.DLPMLJlv.js} +1 -1
  60. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.iufpEbi0.js → pieDiagram-DEJITSTG.BFp11AYt.js} +1 -1
  61. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DdoXbWL9.js → quadrantDiagram-34T5L4WZ.ChX7xo6B.js} +1 -1
  62. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.XL1-_pNk.js → requirementDiagram-MS252O5E.DbKtHG_Q.js} +1 -1
  63. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.DySXofNs.js → sankeyDiagram-XADWPNL6.Spw8tv-7.js} +1 -1
  64. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.Cp0GZoOU.js → sequenceDiagram-FGHM5R23.BYso9LlE.js} +1 -1
  65. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.DvK-sXUX.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.Clup4iIo.js → theme.m_Ethbkv.js} +2 -2
  68. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.gHI9ZLm6.js → timeline-definition-GMOUNBTQ.BLdhhyy9.js} +1 -1
  69. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.G2N2zXYe.js → vennDiagram-DHZGUBPP.CyGT2F_P.js} +1 -1
  70. package/dist/docs/assets/chunks/{wardley-RL74JXVD.C46G0P5a.js → wardley-RL74JXVD.C5JJS3bh.js} +1 -1
  71. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.BgUKEagd.js → wardleyDiagram-NUSXRM2D.p_Sz9p1i.js} +1 -1
  72. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.CwH7oege.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.ClkMoQsV.js → reference_skills.md.Ckddg6KX.js} +1 -1
  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 +37 -37
  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/extensions/cursor-cloud-agents/extension.d.ts +5 -1
  185. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  186. package/dist/extensions/cursor-cloud-agents/extension.js +4 -0
  187. package/dist/extensions/cursor-cloud-agents/lib/channels.d.ts.map +1 -1
  188. package/dist/extensions/cursor-cloud-agents/lib/channels.js +5 -1
  189. package/dist/internal/cli-deploy.d.ts.map +1 -1
  190. package/dist/internal/cli-deploy.js +14 -0
  191. package/dist/internal/continuation-identity.js +1 -1
  192. package/dist/internal/discovery/agent-config.d.ts +6 -0
  193. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  194. package/dist/internal/discovery/agent-config.js +19 -0
  195. package/dist/internal/discovery/agent.d.ts.map +1 -1
  196. package/dist/internal/discovery/agent.js +2 -1
  197. package/dist/internal/hosted-catch-protocol.d.ts +2 -0
  198. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  199. package/dist/internal/hosted-catch-protocol.js +2 -0
  200. package/dist/internal/hosted-catch.d.ts +2 -3
  201. package/dist/internal/hosted-catch.d.ts.map +1 -1
  202. package/dist/internal/hosted-catch.js +2 -3
  203. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  204. package/dist/internal/hosted-delivery.js +22 -12
  205. package/dist/internal/hosted-execution-flush.d.ts +6 -3
  206. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  207. package/dist/internal/hosted-execution-flush.js +28 -31
  208. package/dist/internal/peer-connections.d.ts +6 -2
  209. package/dist/internal/peer-connections.d.ts.map +1 -1
  210. package/dist/internal/peer-connections.js +23 -19
  211. package/dist/internal/sdk-runner.d.ts.map +1 -1
  212. package/dist/internal/sdk-runner.js +5 -2
  213. package/dist/internal/server.d.ts.map +1 -1
  214. package/dist/internal/server.js +6 -5
  215. package/dist/internal/session-engine.d.ts.map +1 -1
  216. package/dist/internal/session-engine.js +3 -0
  217. package/dist/internal/session-run-log.d.ts.map +1 -1
  218. package/dist/internal/session-run-log.js +26 -11
  219. package/dist/playground/assets/index-BVYWBxLU.css +1 -0
  220. package/dist/playground/assets/{index-ClxRl2Cw.js → index-DCsq6f_I.js} +37 -37
  221. package/dist/playground/index.html +2 -2
  222. package/dist/types.d.ts +16 -0
  223. package/dist/types.d.ts.map +1 -1
  224. package/docs/README.md +1 -1
  225. package/docs/building-with-agents.md +5 -5
  226. package/docs/deployment.md +70 -33
  227. package/docs/evals.md +1 -16
  228. package/docs/guides/cloud-agents.md +3 -9
  229. package/docs/guides/grokbot-agents.md +10 -14
  230. package/docs/guides/hooks.md +0 -1
  231. package/docs/guides/improve.md +4 -6
  232. package/docs/guides/mcp-oauth.md +18 -41
  233. package/docs/guides/webhooks.md +35 -18
  234. package/docs/quickstart.md +2 -2
  235. package/docs/reference/channels.md +29 -13
  236. package/docs/reference/cli.md +113 -40
  237. package/docs/reference/connections.md +6 -5
  238. package/docs/reference/evals.md +2 -4
  239. package/docs/reference/hooks.md +0 -1
  240. package/docs/reference/http-api.md +7 -17
  241. package/docs/reference/playground.md +2 -5
  242. package/docs/reference/schedules.md +26 -3
  243. package/docs/reference/sessions.md +1 -2
  244. package/docs/reference/skills.md +1 -1
  245. package/docs/reference/tools.md +3 -29
  246. package/docs/templates/grokbot-agents.md +1 -1
  247. package/docs/troubleshooting.md +12 -7
  248. package/package.json +35 -35
  249. package/skills/create-agent/SKILL.md +9 -6
  250. package/skills/debug/SKILL.md +3 -4
  251. package/skills/evals/SKILL.md +2 -2
  252. package/skills/framework-map/SKILL.md +10 -10
  253. package/skills/mcp-auth/SKILL.md +10 -34
  254. package/skills/migrate-v2/SKILL.md +13 -9
  255. package/skills/setup-slack/SKILL.md +0 -13
  256. package/templates/agents-md/README.md +3 -3
  257. package/templates/agents-md/bot/channels/queue.ts +3 -8
  258. package/templates/agents-md/bot/instructions.md +1 -2
  259. package/templates/agents-md/bot/tools/apply_agents.ts +0 -1
  260. package/templates/agents-md/evals/agents.eval.ts +2 -2
  261. package/templates/demo/bot/channels/queue.ts +5 -15
  262. package/templates/grokbot-agents/.gitignore +4 -0
  263. package/templates/pr-autofixer/bot/channels/drive.ts +3 -16
  264. package/templates/security-help/.gitignore +4 -0
  265. package/templates/triage/bot/channels/queue.ts +11 -22
  266. package/templates/triage/bot/channels/webhook.ts +3 -6
  267. package/templates/triage/bot/lib/parse-queue-event.ts +0 -6
  268. package/dist/docs/assets/chunks/@localSearchIndexroot.CzrtdJ8s.js +0 -1
  269. package/dist/docs/assets/chunks/channel.6ebHhoF9.js +0 -1
  270. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BJ-CwKwu.js +0 -1
  271. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BJ-CwKwu.js +0 -1
  272. package/dist/docs/assets/chunks/clone.DfV2fkWH.js +0 -1
  273. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DNdUCJyd.js +0 -1
  274. package/dist/docs/assets/deployment.md.BYuEcDBv.js +0 -29
  275. package/dist/docs/assets/guides_cloud-agents.md.CWJjS9No.js +0 -10
  276. package/dist/docs/assets/guides_cloud-agents.md.CWJjS9No.lean.js +0 -1
  277. package/dist/docs/assets/guides_grokbot-agents.md.tD1smFhU.js +0 -16
  278. package/dist/docs/assets/guides_mcp-oauth.md.DR3zhC9r.lean.js +0 -1
  279. package/dist/docs/assets/reference_channels.md.LbNIJBwd.js +0 -23
  280. package/dist/docs/assets/reference_http-api.md.DbFNOubV.js +0 -11
  281. package/dist/docs/assets/reference_playground.md.1hx0gcIu.js +0 -1
  282. package/dist/docs/assets/reference_playground.md.1hx0gcIu.lean.js +0 -1
  283. package/dist/docs/assets/reference_sessions.md.CyM7ARz1.js +0 -1
  284. package/dist/docs/assets/reference_tools.md.DzIY9JzY.lean.js +0 -1
  285. package/dist/docs/assets/troubleshooting.md.x-GBa7wN.js +0 -1
  286. package/dist/playground/assets/index-BKSsuEMw.css +0 -1
  287. /package/dist/docs/assets/{guides_hooks.md.5Ce3NXxZ.lean.js → guides_hooks.md.B_bKG1oA.lean.js} +0 -0
  288. /package/dist/docs/assets/{index.md.Dxxr7pFa.lean.js → index.md.BIBHIQtU.lean.js} +0 -0
  289. /package/dist/docs/assets/{quickstart.md.BK5gjHM2.lean.js → quickstart.md.CduLGBAB.lean.js} +0 -0
  290. /package/dist/docs/assets/{reference_evals.md.D5i8PuXJ.lean.js → reference_evals.md.if--BLd0.lean.js} +0 -0
  291. /package/dist/docs/assets/{reference_hooks.md.B-eGa2km.lean.js → reference_hooks.md.DbJC8mcZ.lean.js} +0 -0
  292. /package/dist/docs/assets/{reference_sessions.md.CyM7ARz1.lean.js → reference_sessions.md.C_uzIWuy.lean.js} +0 -0
  293. /package/dist/docs/assets/{reference_skills.md.ClkMoQsV.lean.js → reference_skills.md.Ckddg6KX.lean.js} +0 -0
  294. /package/dist/docs/assets/{templates_grokbot-agents.md.2sydjFiO.lean.js → templates_grokbot-agents.md.DgpPEs7B.lean.js} +0 -0
@@ -0,0 +1,22 @@
1
+ import{_ as t,c as s,o as a,a3 as n}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Channels","description":"Define custom channel routes, schemas, state, events, and authentication.","frontmatter":{"title":"Channels","description":"Define custom channel routes, schemas, state, events, and authentication."},"headers":[],"relativePath":"reference/channels.md","filePath":"reference/channels.md"}'),i={name:"reference/channels.md"};function o(d,e,r,h,l,c){return a(),s("div",null,[...e[0]||(e[0]=[n(`<h1 id="channels" tabindex="-1">Channels <a class="header-anchor" href="#channels" aria-label="Permalink to &quot;Channels&quot;">​</a></h1><p>A channel connects an external surface to agent sessions. A file at <code>bot/channels/&lt;id&gt;.ts</code> defines channel <code>&lt;id&gt;</code> and mounts its routes under <code>/v1/channels/&lt;id&gt;</code>. The built-in HTTP session channel is always available alongside any custom or prebuilt channels.</p><h2 id="built-in-http-channel" tabindex="-1">Built-in HTTP channel <a class="header-anchor" href="#built-in-http-channel" aria-label="Permalink to &quot;Built-in HTTP channel&quot;">​</a></h2><p>The built-in channel serves the session, tool, and discovery routes. In a multi-agent host, each agent&#39;s routes sit under its slug. See the <a href="./http-api.html">HTTP API</a> for request and response contracts.</p><h2 id="define-a-custom-channel" tabindex="-1">Define a custom channel <a class="header-anchor" href="#define-a-custom-channel" aria-label="Permalink to &quot;Define a custom channel&quot;">​</a></h2><p>Use <code>defineChannel</code> with one or more typed routes:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineChannel, POST } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/bdk/channels&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
2
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { z } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;zod&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
3
+ <span class="line"></span>
4
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
5
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> routes: [</span></span>
6
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> POST</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;/review&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
7
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Review a pull request on this channel&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
8
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> bodySchema: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
9
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> message: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(),</span></span>
10
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> prUrl: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">url</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(),</span></span>
11
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }),</span></span>
12
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> handler</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">_request</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, { </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">waitUntil</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">body</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
13
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> waitUntil</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
14
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">body</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">message</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Pull request: \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">body</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">prUrl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
15
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> continuationToken: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`pr:\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">body</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">prUrl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
16
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> })</span></span>
17
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> );</span></span>
18
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Response</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, { status: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">202</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> });</span></span>
19
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
20
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }),</span></span>
21
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
22
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>The route above is <code>POST /v1/channels/&lt;id&gt;/review</code>. Calls for the same pull request reuse one conversation because they pass the same continuation token.</p><h2 id="route-responses" tabindex="-1">Route responses <a class="header-anchor" href="#route-responses" aria-label="Permalink to &quot;Route responses&quot;">​</a></h2><p>A custom route acknowledges the caller and nothing more. On Cursor-managed hosting, the deployment answers every custom route with <code>202 Accepted</code> and an empty body as soon as the request arrives, then runs the handler. The caller never receives the handler&#39;s <code>Response</code>, so a route can&#39;t return a session ID, a computed result, or an error status. Requests rejected before the handler runs, such as a missing alias token or a failed <code>sharedSecretAuth</code> or <code>hmacSignatureAuth</code> check, still get <code>401</code>.</p><p>Deliver results through the channel&#39;s <a href="#events"><code>events</code></a> handlers, a callback to the system that sent the request, or a tool the turn calls. Local <code>serve</code> passes the handler&#39;s response through, so return <code>new Response(null, { status: 202 })</code> to keep local calls matching hosted ones.</p><h2 id="route-verbs-and-schemas" tabindex="-1">Route verbs and schemas <a class="header-anchor" href="#route-verbs-and-schemas" aria-label="Permalink to &quot;Route verbs and schemas&quot;">​</a></h2><p>Route paths must begin with <code>/</code>. The method helper determines which Zod schemas the route accepts:</p><table tabindex="0"><thead><tr><th>Helper</th><th>Schema contract</th></tr></thead><tbody><tr><td><code>GET</code></td><td><code>querySchema</code> is required</td></tr><tr><td><code>POST</code>, <code>PUT</code>, <code>PATCH</code></td><td><code>bodySchema</code> is required; <code>querySchema</code> is optional</td></tr><tr><td><code>DELETE</code></td><td>Both schemas are optional</td></tr></tbody></table><p>Plain JSON Schema objects don&#39;t type-check. Use <code>z.object({})</code> or <code>z.unknown()</code> for an open surface. The host validates the body and query before calling the handler, and an empty body is read as <code>{}</code>. A request that fails validation never reaches the handler; local <code>serve</code> answers it with <code>400</code>, while a hosted caller has already received its <code>202</code>. Declared schemas also appear in <code>GET /v1/info</code> for playground requests and slash commands.</p><h2 id="handler-arguments" tabindex="-1">Handler arguments <a class="header-anchor" href="#handler-arguments" aria-label="Permalink to &quot;Handler arguments&quot;">​</a></h2><p>Each handler receives the Fetch <code>Request</code> and a typed arguments object.</p><table tabindex="0"><thead><tr><th>Member</th><th>Contract</th></tr></thead><tbody><tr><td><code>send(message, options?)</code></td><td>Start or resume a session on this channel</td></tr><tr><td><code>getSession(sessionId)</code></td><td>Return this channel&#39;s session, or <code>null</code></td></tr><tr><td><code>receive(channel, input)</code></td><td>Hand work to another channel</td></tr><tr><td><code>callTool(name, input, options?)</code></td><td><a href="./tools.html#call-a-tool-without-a-model-turn">Call a server tool</a> without a model turn</td></tr><tr><td><code>body</code>, <code>query</code>, <code>params</code></td><td>Validated inputs and <code>:param</code> path segments</td></tr><tr><td><code>auth</code></td><td>The <code>AuthContext</code> returned by the route&#39;s auth chain</td></tr><tr><td><code>requestIp</code></td><td>The TCP peer address, or <code>null</code></td></tr><tr><td><code>host</code></td><td>Shared MCP, provider, storage, telemetry, and reminder services</td></tr><tr><td><code>waitUntil(promise)</code></td><td>Keep work running after the handler returns</td></tr><tr><td><code>sessionUrls(request, sessionId)</code></td><td>Build absolute playground and trace URLs for this mount</td></tr><tr><td><code>artifacts</code></td><td>List or tag <a href="./artifacts.html">artifacts</a>; pass <code>sessionId</code> when attributing one</td></tr></tbody></table><h3 id="send-options" tabindex="-1"><code>send</code> options <a class="header-anchor" href="#send-options" aria-label="Permalink to &quot;\`send\` options&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>continuationToken</code></td><td>Resume the session with this channel-local key, or create one when the key is new</td></tr><tr><td><code>admission</code></td><td><code>&quot;preempt&quot;</code> interrupts a busy turn; <code>&quot;coalesce&quot;</code> queues behind it. The default is <code>&quot;preempt&quot;</code></td></tr><tr><td><code>workspaceFiles</code></td><td>Add relative files for the next turn</td></tr><tr><td><code>workspaceDir</code></td><td>Use an absolute local working directory</td></tr><tr><td><code>auth</code></td><td>Set the session principal; defaults to the request principal</td></tr><tr><td><code>state</code></td><td>Set starting channel state for a new session</td></tr><tr><td><code>title</code></td><td>Set the display title for a new session</td></tr><tr><td><code>purpose</code></td><td>Use <code>&quot;eval&quot;</code> to mark a new session as regression traffic</td></tr><tr><td><code>dryRun</code></td><td>Run read tools and stub write tools for a new session</td></tr><tr><td><code>asOf</code></td><td>Freeze a new session at an ISO-8601 instant with a timezone</td></tr></tbody></table><p><code>send</code> returns a <code>ChannelSession</code>. Its <code>id</code> identifies the session, <code>continuationToken</code> contains its current channel key, and <code>isNew</code> says whether this call created it. A coalesced call also returns <code>coalesced: true</code>.</p><h2 id="events" tabindex="-1">Events <a class="header-anchor" href="#events" aria-label="Permalink to &quot;Events&quot;">​</a></h2><p>The <code>events</code> map subscribes the channel to stream events for the sessions it owns. Keys are event types from the <a href="./sessions.html#stream-events">event vocabulary</a>, or <code>&quot;*&quot;</code>. Each handler receives <code>(event, channel, ctx)</code>, including the session&#39;s <code>channel.state</code>, session info, and shared host services. Use these handlers to deliver progress and replies to the surface that owns the channel.</p><h2 id="session-state" tabindex="-1">Session state <a class="header-anchor" href="#session-state" aria-label="Permalink to &quot;Session state&quot;">​</a></h2><p><code>state</code> on the channel definition supplies starting JSON for each new session. A route can instead pass <code>state</code> to <code>send</code>; event handlers read and update the active value through <code>channel.state</code>.</p><h2 id="start-and-stop-a-channel" tabindex="-1">Start and stop a channel <a class="header-anchor" href="#start-and-stop-a-channel" aria-label="Permalink to &quot;Start and stop a channel&quot;">​</a></h2><p><code>onStart(args)</code> runs when the channel mounts, and <code>onStop()</code> runs when the host stops. <code>onStart</code> receives the route helpers plus these transport controls:</p><table tabindex="0"><thead><tr><th>Helper</th><th>Contract</th></tr></thead><tbody><tr><td><code>emitAssistantMessage(sessionId, text)</code></td><td>Append final assistant text without starting a model turn</td></tr><tr><td><code>hasContinuationSession(token)</code></td><td>Check whether a token maps to a session</td></tr><tr><td><code>isContinuationBusy(token)</code></td><td>Check whether a turn is active for a token</td></tr><tr><td><code>interruptContinuation(token)</code></td><td>Stop the active turn and clear queued coalesced follow-ups</td></tr></tbody></table><h2 id="auth-policies" tabindex="-1">Auth policies <a class="header-anchor" href="#auth-policies" aria-label="Permalink to &quot;Auth policies&quot;">​</a></h2><p>Every route runs the channel&#39;s <code>auth</code> array. The default is <code>[localDevStrict()]</code>. Policies may be asynchronous; the first one to return an <code>AuthContext</code> admits the request, and an all-null result returns <code>401</code>.</p><table tabindex="0"><thead><tr><th>Policy</th><th>Admits</th></tr></thead><tbody><tr><td><code>localDevStrict()</code></td><td>Direct loopback requests with a loopback hostname and no proxy-forwarding headers</td></tr><tr><td><code>localDev()</code></td><td>Direct loopback requests with no proxy-forwarding headers, without checking the hostname</td></tr><tr><td><code>loopbackOnly()</code></td><td>Any loopback TCP peer, including local relays that carry forwarding headers</td></tr><tr><td><code>bearerAuth(tokenOrVerify)</code></td><td>A matching bearer token, or a token accepted by the verifier</td></tr><tr><td><code>sharedSecretAuth({ header, secret })</code></td><td>A header matching the named environment or deployment secret</td></tr><tr><td><code>hmacSignatureAuth({ header, secret, prefix? })</code></td><td>A hex HMAC-SHA256 signature over the raw body using the named secret</td></tr><tr><td><code>allowAll()</code></td><td>Every caller as an anonymous principal</td></tr><tr><td><code>publicEndpoint()</code></td><td>Every caller on this custom channel; managed hosting also exposes the route without an alias token</td></tr></tbody></table><p>Use <code>allowAll()</code> only for an intentionally public surface or one protected upstream. With <code>publicEndpoint()</code>, the handler must verify the provider&#39;s signature. The policy applies only to custom channel routes; it doesn&#39;t open the built-in session or tool API.</p><p>The resolved <code>AuthContext</code> (<code>{ authenticator, principalId, principalType, attributes? }</code>) becomes the request principal. Sessions belong to the principal that created them, and other principals receive <code>403</code> on owned routes.</p><p>Server flags interact with authored auth: <code>--bearer-token</code> swaps the default <code>localDevStrict()</code> for <code>bearerAuth(...)</code> on channels that don&#39;t author their own chain, and <code>--allow-anonymous</code> swaps it for <code>allowAll()</code>. An authored <code>auth</code> array always takes precedence.</p><h2 id="prebuilt-channels" tabindex="-1">Prebuilt channels <a class="header-anchor" href="#prebuilt-channels" aria-label="Permalink to &quot;Prebuilt channels&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Import</th><th>Function</th><th>Surface</th></tr></thead><tbody><tr><td><code>@cursor/bdk/channels/slack</code></td><td><code>slackChannel()</code></td><td>Slack messages, threads, and streaming replies. See <a href="./../guides/slack.html">Slack</a></td></tr><tr><td><code>@cursor/bdk/channels/github</code></td><td><code>githubChannel()</code></td><td>GitHub and GitHub Enterprise webhooks. See <a href="./../guides/github.html">GitHub</a></td></tr><tr><td><code>@cursor/bdk/channels/gitlab</code></td><td><code>gitlabChannel()</code></td><td>GitLab.com and self-managed GitLab hooks. See <a href="./../guides/gitlab.html">GitLab</a></td></tr><tr><td><code>@cursor/bdk/channels/bitbucket</code></td><td><code>bitbucketChannel()</code></td><td>Bitbucket Cloud and Data Center hooks. See <a href="./../guides/bitbucket.html">Bitbucket</a></td></tr><tr><td><code>@cursor/bdk/channels/deployments</code></td><td><code>deploymentsChannel()</code></td><td>Deployment events filtered by source, environment, or event name</td></tr></tbody></table><p>For other platforms like Discord or Teams, use the authored <code>defineChannel</code> route form.</p><h2 id="continuation-tokens" tabindex="-1">Continuation tokens <a class="header-anchor" href="#continuation-tokens" aria-label="Permalink to &quot;Continuation tokens&quot;">​</a></h2><p>Each channel defines its continuation-token format. The same token resumes the same conversation; the built-in HTTP channel rotates its opaque token after every accepted follow-up and returns <code>409</code> for a stale token. See <a href="./sessions.html#session-identifiers">Session identifiers</a> for the full contract.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./../guides/webhooks.html">Webhooks</a></li><li><a href="./http-api.html">HTTP API</a></li><li><a href="./sessions.html">Sessions</a></li><li><a href="./hooks.html">Hooks</a></li></ul>`,41)])])}const u=t(i,[["render",o]]);export{k as __pageData,u as default};
@@ -1 +1 @@
1
- import{_ as t,c as s,o as a,a3 as n}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Channels","description":"Define custom channel routes, schemas, state, events, and authentication.","frontmatter":{"title":"Channels","description":"Define custom channel routes, schemas, state, events, and authentication."},"headers":[],"relativePath":"reference/channels.md","filePath":"reference/channels.md"}'),i={name:"reference/channels.md"};function o(d,e,r,h,l,c){return a(),s("div",null,[...e[0]||(e[0]=[n("",38)])])}const u=t(i,[["render",o]]);export{k as __pageData,u as default};
1
+ import{_ as t,c as s,o as a,a3 as n}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Channels","description":"Define custom channel routes, schemas, state, events, and authentication.","frontmatter":{"title":"Channels","description":"Define custom channel routes, schemas, state, events, and authentication."},"headers":[],"relativePath":"reference/channels.md","filePath":"reference/channels.md"}'),i={name:"reference/channels.md"};function o(d,e,r,h,l,c){return a(),s("div",null,[...e[0]||(e[0]=[n("",41)])])}const u=t(i,[["render",o]]);export{k as __pageData,u as default};
@@ -1,4 +1,4 @@
1
- import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),d={name:"reference/cli.md"};function n(r,e,c,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s(`<h1 id="bdk-cli" tabindex="-1">BDK CLI <a class="header-anchor" href="#bdk-cli" aria-label="Permalink to &quot;BDK CLI&quot;">​</a></h1><p>The Grok Bot Development Kit (BDK) uses the <code>@cursor/bdk</code> package and <code>bdk</code> CLI.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk &lt;command&gt;</span></span></code></pre></div><p>The command catalog below documents the <code>bdk</code> binary from <code>@cursor/bdk</code>. Run it with Node 22.13 or newer; Bun is not supported. Commands exit nonzero when validation or a synchronous request fails; asynchronous commands can exit <code>0</code> once work is accepted. Project paths use the <a href="./project-layout.html">BDK project layout</a>.</p><p>Install <code>@cursor/bdk</code> to obtain the binary. <code>bdk help</code> prints top-level help; the Slack, GitHub, GitLab, and Bitbucket command packs provide their own <code>help</code> subcommands.</p><h2 id="command-catalog" tabindex="-1">Command catalog <a class="header-anchor" href="#command-catalog" aria-label="Permalink to &quot;Command catalog&quot;">​</a></h2><h3 id="development-commands" tabindex="-1">Development commands <a class="header-anchor" href="#development-commands" aria-label="Permalink to &quot;Development commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>help</code>, <code>--help</code>, <code>-h</code></td><td>Print top-level help</td></tr><tr><td><a href="#serve"><code>serve</code></a></td><td>Serve one or more agents over HTTP</td></tr><tr><td><a href="#dev"><code>dev</code></a></td><td>Serve agents with local-development behavior</td></tr><tr><td><a href="#docs"><code>docs</code></a></td><td>Serve the documentation bundled with <code>@cursor/bdk</code></td></tr><tr><td><a href="#init"><code>init</code></a></td><td>Scaffold a BDK project</td></tr><tr><td><a href="#convert-automation"><code>convert-automation</code></a></td><td>Export a Cursor Automation into a project</td></tr><tr><td><a href="#migrate"><code>migrate</code></a></td><td>Move an early-alpha project to architecture v2 through a pull request</td></tr><tr><td><a href="#install-skills"><code>install-skills</code></a></td><td>Refresh the bundled coding-agent skills</td></tr><tr><td><a href="#info"><code>info</code></a></td><td>Print the discovered project surface</td></tr><tr><td><a href="#validate"><code>validate</code></a></td><td>Check project diagnostics and set the exit status</td></tr><tr><td><a href="#manifest"><code>manifest</code></a></td><td>Print deployment metadata as JSON</td></tr><tr><td><a href="#version"><code>version</code></a></td><td>Print the installed package version</td></tr><tr><td><a href="#update"><code>update</code></a></td><td>Upgrade the installed CLI</td></tr><tr><td><a href="#login-logout-whoami"><code>login</code></a></td><td>Sign the host in to Cursor</td></tr><tr><td><a href="#login-logout-whoami"><code>logout</code></a></td><td>Remove the stored Cursor credential</td></tr><tr><td><a href="#login-logout-whoami"><code>whoami</code></a></td><td>Show the active Cursor credential</td></tr></tbody></table><h3 id="session-and-eval-commands" tabindex="-1">Session and eval commands <a class="header-anchor" href="#session-and-eval-commands" aria-label="Permalink to &quot;Session and eval commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#chat"><code>chat</code></a></td><td>Talk to a running agent</td></tr><tr><td><a href="#resume"><code>resume</code></a></td><td>Reattach chat to a previous session</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Start or continue work on a local, running, or hosted agent</td></tr><tr><td><a href="#call"><code>call</code></a></td><td>Call a server tool without a model turn</td></tr><tr><td><a href="#skill"><code>skill</code></a></td><td>Read an authored skill without a model turn</td></tr><tr><td><a href="#logs"><code>logs</code></a></td><td>Follow or dump agent logs</td></tr><tr><td><a href="#sessions"><code>sessions</code></a></td><td>List sessions</td></tr><tr><td><a href="#session"><code>session</code></a></td><td>Inspect a session or start a hosted session turn</td></tr><tr><td><a href="#cost"><code>cost</code></a></td><td>Report token usage and estimated cost</td></tr><tr><td><a href="#playground"><code>playground</code></a></td><td>Open an agent&#39;s playground</td></tr><tr><td><a href="#trajectory"><code>trajectory</code></a></td><td>Summarize a saved event stream</td></tr><tr><td><a href="#eval"><code>eval</code></a></td><td>List, run, inspect, or cancel evals</td></tr></tbody></table><h3 id="managed-hosting-commands" tabindex="-1">Managed hosting commands <a class="header-anchor" href="#managed-hosting-commands" aria-label="Permalink to &quot;Managed hosting commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#deploy"><code>deploy</code></a></td><td>Deploy one or more agents</td></tr><tr><td><a href="#deployments"><code>deployments</code></a></td><td>List deployments</td></tr><tr><td><a href="#deployment"><code>deployment</code></a></td><td>Inspect one deployment</td></tr><tr><td><a href="#stop"><code>stop</code></a></td><td>Stop a deployment</td></tr><tr><td><a href="#cancel-runs"><code>cancel-runs</code></a></td><td>Cancel active runs and reminder wakes</td></tr><tr><td><a href="#event-repos"><code>event-repos</code></a></td><td>Replace a deployment&#39;s event repositories</td></tr><tr><td><a href="#upgrade"><code>upgrade</code></a></td><td>Move a deployment to a release</td></tr><tr><td><a href="#delete"><code>delete</code></a></td><td>Delete a deployment</td></tr><tr><td><a href="#rotate-token"><code>rotate-token</code></a></td><td>Replace a deployment&#39;s alias token</td></tr><tr><td><a href="#secrets"><code>secrets</code></a></td><td>Set, list, or remove deployment secrets</td></tr></tbody></table><h3 id="connection-and-channel-commands" tabindex="-1">Connection and channel commands <a class="header-anchor" href="#connection-and-channel-commands" aria-label="Permalink to &quot;Connection and channel commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#mcp"><code>mcp</code></a></td><td>Proxy an agent&#39;s MCP endpoint over stdio</td></tr><tr><td><a href="#mcp"><code>mcp install</code></a></td><td>Add the agent to an MCP client config</td></tr><tr><td><a href="#mcp-oauth"><code>mcp oauth</code></a></td><td>Authorize an MCP connection</td></tr><tr><td><a href="#slack"><code>slack</code></a></td><td>Provision and check Slack channel apps</td></tr><tr><td><a href="#github"><code>github</code></a></td><td>Forward, replay, and inspect GitHub webhooks</td></tr><tr><td><a href="#gitlab"><code>gitlab</code></a></td><td>Replay and inspect GitLab webhooks</td></tr><tr><td><a href="#bitbucket"><code>bitbucket</code></a></td><td>Replay and inspect Bitbucket webhooks</td></tr></tbody></table><h2 id="choose-a-target" tabindex="-1">Targets <a class="header-anchor" href="#choose-a-target" aria-label="Permalink to &quot;Targets {#choose-a-target}&quot;">​</a></h2><p>Commands that send requests support these targets:</p><table tabindex="0"><thead><tr><th>Target</th><th>Selection</th><th>Commands</th></tr></thead><tbody><tr><td>Ephemeral local server</td><td>Omit <code>--url</code> and <code>--prod</code></td><td><code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code></td></tr><tr><td>Running server</td><td>Pass <code>--url &lt;baseUrl&gt;</code></td><td><code>chat</code>, <code>resume</code>, <code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code>, <code>mcp</code></td></tr><tr><td>Default local server</td><td>Omit <code>--url</code> and <code>--prod</code>; uses <code>http://127.0.0.1:3000</code></td><td><code>chat</code>, <code>resume</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code></td></tr><tr><td>Hosted deployment</td><td>Pass <code>--prod</code></td><td><code>run</code>, <code>session</code>, <code>playground</code></td></tr></tbody></table><p>An explicit <code>--url</code> must include the slug for a multi-agent server, such as <code>http://127.0.0.1:3000/pr-approver</code>. <code>--slug</code> never changes an explicit URL. <code>--url</code> and <code>--prod</code> are mutually exclusive.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--dir &lt;path&gt;</code></td><td>Select the project root. The default is the current directory.</td></tr><tr><td><code>--url &lt;baseUrl&gt;</code></td><td>Use a running agent instead of local project discovery.</td></tr><tr><td><code>--prod</code></td><td>Use the hosted deployment. Only <code>run</code>, <code>session</code>, and <code>playground</code> accept it.</td></tr><tr><td><code>--slug &lt;slug&gt;</code></td><td>Select an agent from a multi-agent project or a hosted resource. Under <code>--prod</code>, the default is the <code>--dir</code> basename.</td></tr><tr><td><code>--team &lt;id&gt;</code></td><td>Select a Cursor team. The signed-in account&#39;s team is the default.</td></tr><tr><td><code>--api-key &lt;key&gt;</code></td><td>Override the Cursor credential for commands that authenticate with Cursor.</td></tr><tr><td><code>--bearer-token &lt;token&gt;</code></td><td>Authenticate to a running server with a bearer token.</td></tr><tr><td><code>--state-root &lt;path&gt;</code></td><td>Select local state for <code>serve</code> and ephemeral <code>run</code>, <code>call</code>, <code>skill</code>, and <code>eval</code> targets. Running and <code>--prod</code> targets ignore it.</td></tr><tr><td><code>--json</code></td><td>Request machine-readable output when the command supports it. <code>run</code> already defaults to JSON.</td></tr></tbody></table><h2 id="local-servers" tabindex="-1">Local servers <a class="header-anchor" href="#local-servers" aria-label="Permalink to &quot;Local servers&quot;">​</a></h2><h3 id="serve" tabindex="-1">Serve agents <a class="header-anchor" href="#serve" aria-label="Permalink to &quot;Serve agents {#serve}&quot;">​</a></h3><p><code>serve</code> mounts every project discovered under <code>--dir</code>:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk serve [--dir &lt;path&gt;] [--port &lt;n&gt;] [--host &lt;host&gt;]</span></span>
1
+ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),d={name:"reference/cli.md"};function n(c,e,r,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s(`<h1 id="bdk-cli" tabindex="-1">BDK CLI <a class="header-anchor" href="#bdk-cli" aria-label="Permalink to &quot;BDK CLI&quot;">​</a></h1><p>The Grok Bot Development Kit (BDK) uses the <code>@cursor/bdk</code> package and <code>bdk</code> CLI.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk &lt;command&gt;</span></span></code></pre></div><p>The command catalog below documents the <code>bdk</code> binary from <code>@cursor/bdk</code>. Run it with Node 22.13 or newer; Bun is not supported. Commands exit nonzero when validation or a synchronous request fails; asynchronous commands can exit <code>0</code> once work is accepted. Project paths use the <a href="./project-layout.html">BDK project layout</a>.</p><p>Install <code>@cursor/bdk</code> to obtain the binary. <code>bdk help</code> prints top-level help; the Slack, GitHub, GitLab, and Bitbucket command packs provide their own <code>help</code> subcommands.</p><h2 id="command-catalog" tabindex="-1">Command catalog <a class="header-anchor" href="#command-catalog" aria-label="Permalink to &quot;Command catalog&quot;">​</a></h2><h3 id="development-commands" tabindex="-1">Development commands <a class="header-anchor" href="#development-commands" aria-label="Permalink to &quot;Development commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>help</code>, <code>--help</code>, <code>-h</code></td><td>Print top-level help</td></tr><tr><td><a href="#serve"><code>serve</code></a></td><td>Serve one or more agents over HTTP</td></tr><tr><td><a href="#dev"><code>dev</code></a></td><td>Serve agents with local-development behavior</td></tr><tr><td><a href="#docs"><code>docs</code></a></td><td>Serve the documentation bundled with <code>@cursor/bdk</code></td></tr><tr><td><a href="#init"><code>init</code></a></td><td>Scaffold a BDK project</td></tr><tr><td><a href="#convert-automation"><code>convert-automation</code></a></td><td>Export a Cursor Automation into a project</td></tr><tr><td><a href="#migrate"><code>migrate</code></a></td><td>Move an early-alpha project to architecture v2 through a pull request</td></tr><tr><td><a href="#install-skills"><code>install-skills</code></a></td><td>Refresh the bundled coding-agent skills</td></tr><tr><td><a href="#info"><code>info</code></a></td><td>Print the discovered project surface</td></tr><tr><td><a href="#validate"><code>validate</code></a></td><td>Check project diagnostics and set the exit status</td></tr><tr><td><a href="#manifest"><code>manifest</code></a></td><td>Print deployment metadata as JSON</td></tr><tr><td><a href="#version"><code>version</code></a></td><td>Print the installed package version</td></tr><tr><td><a href="#update"><code>update</code></a></td><td>Upgrade the installed CLI</td></tr><tr><td><a href="#login-logout-whoami"><code>login</code></a></td><td>Sign the host in to Cursor</td></tr><tr><td><a href="#login-logout-whoami"><code>logout</code></a></td><td>Remove the stored Cursor credential</td></tr><tr><td><a href="#login-logout-whoami"><code>whoami</code></a></td><td>Show the active Cursor credential</td></tr></tbody></table><h3 id="session-and-eval-commands" tabindex="-1">Session and eval commands <a class="header-anchor" href="#session-and-eval-commands" aria-label="Permalink to &quot;Session and eval commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#chat"><code>chat</code></a></td><td>Talk to a running agent</td></tr><tr><td><a href="#resume"><code>resume</code></a></td><td>Reattach chat to a previous session</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Start or continue work on a local, running, or hosted agent</td></tr><tr><td><a href="#call"><code>call</code></a></td><td>Call a server tool without a model turn</td></tr><tr><td><a href="#skill"><code>skill</code></a></td><td>Read an authored skill without a model turn</td></tr><tr><td><a href="#logs"><code>logs</code></a></td><td>Follow or dump agent logs</td></tr><tr><td><a href="#sessions"><code>sessions</code></a></td><td>List sessions</td></tr><tr><td><a href="#session"><code>session</code></a></td><td>Inspect a session or start a hosted session turn</td></tr><tr><td><a href="#cost"><code>cost</code></a></td><td>Report token usage and estimated cost</td></tr><tr><td><a href="#playground"><code>playground</code></a></td><td>Open an agent&#39;s playground</td></tr><tr><td><a href="#trajectory"><code>trajectory</code></a></td><td>Summarize a saved event stream</td></tr><tr><td><a href="#eval"><code>eval</code></a></td><td>List, run, inspect, or cancel evals</td></tr></tbody></table><h3 id="managed-hosting-commands" tabindex="-1">Managed hosting commands <a class="header-anchor" href="#managed-hosting-commands" aria-label="Permalink to &quot;Managed hosting commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#deploy"><code>deploy</code></a></td><td>Deploy one or more agents</td></tr><tr><td><a href="#deployments"><code>deployments</code></a></td><td>List deployments</td></tr><tr><td><a href="#deployment"><code>deployment</code></a></td><td>Inspect one deployment</td></tr><tr><td><a href="#stop"><code>stop</code></a></td><td>Stop a deployment</td></tr><tr><td><a href="#start"><code>start</code></a></td><td>Start a stopped deployment</td></tr><tr><td><a href="#kill"><code>kill</code></a></td><td>Stop a deployment, cancel its runs, and lock deploys</td></tr><tr><td><a href="#unlock-deploys"><code>unlock-deploys</code></a></td><td>Let a killed deployment deploy again</td></tr><tr><td><a href="#cancel-runs"><code>cancel-runs</code></a></td><td>Cancel active runs and reminder wakes</td></tr><tr><td><a href="#event-repos"><code>event-repos</code></a></td><td>Replace a deployment&#39;s event repositories</td></tr><tr><td><a href="#upgrade"><code>upgrade</code></a></td><td>Move a deployment to a release</td></tr><tr><td><a href="#rollback"><code>rollback</code></a></td><td>Move a deployment to an earlier release</td></tr><tr><td><a href="#delete"><code>delete</code></a></td><td>Delete a deployment</td></tr><tr><td><a href="#rotate-token"><code>rotate-token</code></a></td><td>Replace a deployment&#39;s alias token</td></tr><tr><td><a href="#secrets"><code>secrets</code></a></td><td>Set, list, or remove deployment secrets</td></tr><tr><td><a href="#images"><code>images</code></a></td><td>Push, list, or remove container images for persistent agents</td></tr></tbody></table><h3 id="connection-and-channel-commands" tabindex="-1">Connection and channel commands <a class="header-anchor" href="#connection-and-channel-commands" aria-label="Permalink to &quot;Connection and channel commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#mcp"><code>mcp</code></a></td><td>Proxy an agent&#39;s MCP endpoint over stdio</td></tr><tr><td><a href="#mcp"><code>mcp install</code></a></td><td>Add the agent to an MCP client config</td></tr><tr><td><a href="#mcp-oauth"><code>mcp oauth</code></a></td><td>Authorize an MCP connection</td></tr><tr><td><a href="#slack"><code>slack</code></a></td><td>Provision and check Slack channel apps</td></tr><tr><td><a href="#github"><code>github</code></a></td><td>Forward, replay, and inspect GitHub webhooks</td></tr><tr><td><a href="#gitlab"><code>gitlab</code></a></td><td>Replay and inspect GitLab webhooks</td></tr><tr><td><a href="#bitbucket"><code>bitbucket</code></a></td><td>Replay and inspect Bitbucket webhooks</td></tr></tbody></table><h2 id="choose-a-target" tabindex="-1">Targets <a class="header-anchor" href="#choose-a-target" aria-label="Permalink to &quot;Targets {#choose-a-target}&quot;">​</a></h2><p>Commands that send requests support these targets:</p><table tabindex="0"><thead><tr><th>Target</th><th>Selection</th><th>Commands</th></tr></thead><tbody><tr><td>Ephemeral local server</td><td>Omit <code>--url</code> and <code>--prod</code></td><td><code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code></td></tr><tr><td>Running server</td><td>Pass <code>--url &lt;baseUrl&gt;</code></td><td><code>chat</code>, <code>resume</code>, <code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code>, <code>mcp</code></td></tr><tr><td>Default local server</td><td>Omit <code>--url</code> and <code>--prod</code>; uses <code>http://127.0.0.1:3000</code></td><td><code>chat</code>, <code>resume</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code></td></tr><tr><td>Hosted deployment</td><td>Pass <code>--prod</code></td><td><code>run</code>, <code>session</code>, <code>logs</code>, <code>playground</code></td></tr></tbody></table><p>An explicit <code>--url</code> must include the slug for a multi-agent server, such as <code>http://127.0.0.1:3000/pr-approver</code>. <code>--slug</code> never changes an explicit URL. <code>--url</code> and <code>--prod</code> are mutually exclusive.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--dir &lt;path&gt;</code></td><td>Select the project root. The default is the current directory.</td></tr><tr><td><code>--url &lt;baseUrl&gt;</code></td><td>Use a running agent instead of local project discovery.</td></tr><tr><td><code>--prod</code></td><td>Use the hosted deployment. Only <code>run</code>, <code>session</code>, <code>logs</code>, and <code>playground</code> accept it; <code>chat</code>, <code>resume</code>, <code>call</code>, <code>skill</code>, <code>sessions</code>, <code>cost</code>, and <code>mcp</code> report that the deployment doesn&#39;t support the command, and <code>eval</code> rejects the flag.</td></tr><tr><td><code>--slug &lt;slug&gt;</code></td><td>Select an agent from a multi-agent project or a hosted deployment. Under <code>--prod</code>, the default is the <code>--dir</code> basename.</td></tr><tr><td><code>--team &lt;id&gt;</code></td><td>Select a Cursor team. The signed-in account&#39;s team is the default.</td></tr><tr><td><code>--api-key &lt;key&gt;</code></td><td>Override the Cursor credential for commands that authenticate with Cursor.</td></tr><tr><td><code>--bearer-token &lt;token&gt;</code></td><td>Authenticate to a running server with a bearer token.</td></tr><tr><td><code>--state-root &lt;path&gt;</code></td><td>Select local state for <code>serve</code> and ephemeral <code>run</code>, <code>call</code>, <code>skill</code>, and <code>eval</code> targets. Running and <code>--prod</code> targets ignore it.</td></tr><tr><td><code>--json</code></td><td>Request machine-readable output when the command supports it. <code>run</code> already defaults to JSON.</td></tr></tbody></table><h2 id="local-servers" tabindex="-1">Local servers <a class="header-anchor" href="#local-servers" aria-label="Permalink to &quot;Local servers&quot;">​</a></h2><h3 id="serve" tabindex="-1">Serve agents <a class="header-anchor" href="#serve" aria-label="Permalink to &quot;Serve agents {#serve}&quot;">​</a></h3><p><code>serve</code> mounts every project discovered under <code>--dir</code>:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk serve [--dir &lt;path&gt;] [--port &lt;n&gt;] [--host &lt;host&gt;]</span></span>
2
2
  <span class="line"><span> [--mode multi|single] [--dev] [--api-key &lt;key&gt;]</span></span>
3
3
  <span class="line"><span> [--state-root &lt;path&gt;]</span></span>
4
4
  <span class="line"><span> [--bearer-token &lt;secret&gt; | --allow-anonymous]</span></span>
@@ -17,19 +17,19 @@ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON
17
17
  <span class="line"><span> [--session &lt;id&gt;] [--continuation-token &lt;token&gt;]</span></span>
18
18
  <span class="line"><span> [--events &lt;file&gt; | --no-events] [--text]</span></span>
19
19
  <span class="line"><span> [--timeout-ms &lt;n&gt;] [--no-stream] [--slug &lt;slug&gt;] [--team &lt;id&gt;]</span></span>
20
- <span class="line"><span> [--dry-run] [--as-of &lt;instant&gt;] [--component &lt;key&gt;]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--message &lt;text&gt;</code></td><td>Send a user message. Repeat it for a multi-turn local or <code>--url</code> run. <code>--prod</code> starts accept one message.</td></tr><tr><td><code>--messages-file &lt;path&gt;</code></td><td>Read a JSON array of strings. File messages run before repeated <code>--message</code> values.</td></tr><tr><td><code>--session &lt;id&gt;</code></td><td>Continue a session. With <code>--prod</code>, pass a hosted <code>ses_...</code> ID.</td></tr><tr><td><code>--continuation-token &lt;token&gt;</code></td><td>Continue the session selected by <code>--session</code> on a running server. <code>--prod</code> starts use <code>--session</code> instead.</td></tr><tr><td><code>--events &lt;file&gt;</code></td><td>Write the raw NDJSON stream to this path.</td></tr><tr><td><code>--no-events</code></td><td>Skip the NDJSON trace.</td></tr><tr><td><code>--text</code></td><td>Print a compact trajectory instead of JSON.</td></tr><tr><td><code>--timeout-ms &lt;n&gt;</code></td><td>Stop waiting after a positive number of milliseconds. There is no default timeout.</td></tr><tr><td><code>--no-stream</code></td><td>Hide live tool and reply progress on stderr.</td></tr><tr><td><code>--dry-run</code></td><td>Mark a <code>--prod</code> turn as non-mutating.</td></tr><tr><td><code>--as-of &lt;instant&gt;</code></td><td>Freeze a <code>--prod</code> session&#39;s clock at a timezone-bearing ISO-8601 instant.</td></tr><tr><td><code>--component &lt;key&gt;</code></td><td>Select a hosted deployment&#39;s component instead of its default.</td></tr></tbody></table><p>For local and running-server targets, JSON output contains <code>ok</code>, <code>sessionId</code>, <code>continuationToken</code>, <code>trace</code>, <code>playgroundUrl</code>, <code>playgroundHint</code>, <code>visualize</code>, and <code>trajectory</code>. The <code>trace</code> value gives the saved path when event output is enabled. With <code>--prod</code>, <code>run</code> prints a <code>deliveryId</code> when the deployment accepts the turn and returns before the turn finishes. A fresh start has no <code>sessionId</code> yet, even with <code>--dry-run</code>; a continuation includes it. <code>--prod</code> starts ignore <code>--events</code>, <code>--no-events</code>, <code>--text</code>, <code>--timeout-ms</code>, and <code>--no-stream</code>, and a successful start exits <code>0</code> before the turn outcome is known. See <a href="./../deployment.html#verify-a-hosted-turn">Verify a hosted turn</a>.</p><h3 id="call" tabindex="-1">Call a tool <a class="header-anchor" href="#call" aria-label="Permalink to &quot;Call a tool {#call}&quot;">​</a></h3><p><code>call</code> invokes a server tool without a model turn:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk call &lt;tool&gt; [--input &lt;json&gt;]</span></span>
20
+ <span class="line"><span> [--dry-run] [--as-of &lt;instant&gt;] [--component &lt;key&gt;]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--message &lt;text&gt;</code></td><td>Send a user message. Repeat it for a multi-turn local or <code>--url</code> run. A <code>--prod</code> run takes exactly one message.</td></tr><tr><td><code>--messages-file &lt;path&gt;</code></td><td>Read a JSON array of strings. File messages run before repeated <code>--message</code> values.</td></tr><tr><td><code>--session &lt;id&gt;</code></td><td>Continue a session. With <code>--prod</code>, pass a hosted <code>ses_...</code> ID from a session that <code>run --prod</code> or <code>session --prod</code> started; Slack, SCM, and custom-route sessions can&#39;t be continued this way.</td></tr><tr><td><code>--continuation-token &lt;token&gt;</code></td><td>Continue the session selected by <code>--session</code> on a running server. <code>--prod</code> doesn&#39;t accept it.</td></tr><tr><td><code>--events &lt;file&gt;</code></td><td>Write the raw NDJSON stream to this path.</td></tr><tr><td><code>--no-events</code></td><td>Skip the NDJSON trace.</td></tr><tr><td><code>--text</code></td><td>Print a compact trajectory instead of JSON.</td></tr><tr><td><code>--timeout-ms &lt;n&gt;</code></td><td>Stop waiting after a positive number of milliseconds. There is no default timeout.</td></tr><tr><td><code>--no-stream</code></td><td>Hide live tool and reply progress on stderr.</td></tr><tr><td><code>--dry-run</code></td><td>Start a <code>--prod</code> session that runs read tools and stubs write tools.</td></tr><tr><td><code>--as-of &lt;instant&gt;</code></td><td>Freeze a <code>--prod</code> session&#39;s clock at an ISO-8601 instant with a timezone, such as <code>2026-08-31T12:00:00Z</code>.</td></tr><tr><td><code>--component &lt;key&gt;</code></td><td>Wake a named component of a <code>--prod</code> deployment instead of its default. A continued session must belong to that component.</td></tr></tbody></table><p>For local and running-server targets, JSON output contains <code>ok</code>, <code>sessionId</code>, <code>continuationToken</code>, <code>trace</code>, <code>playgroundUrl</code>, <code>playgroundHint</code>, <code>visualize</code>, and <code>trajectory</code>. The <code>trace</code> value gives the saved path when event output is enabled.</p><p>With <code>--prod</code>, <code>run</code> returns as soon as the deployment accepts the turn and exits <code>0</code> before the turn outcome is known. It prints <code>deliveryId</code>, <code>workflowId</code>, and <code>sessionMode</code>, plus <code>dryRun</code> and <code>asOf</code> when set. A fresh start has no <code>sessionId</code> yet; a continuation echoes the <code>--session</code> value. <code>--events</code>, <code>--no-events</code>, <code>--text</code>, <code>--timeout-ms</code>, and <code>--no-stream</code> have no effect. See <a href="./../deployment.html#verify-a-hosted-turn">Verify a hosted turn</a> for finding and following the new session.</p><h3 id="call" tabindex="-1">Call a tool <a class="header-anchor" href="#call" aria-label="Permalink to &quot;Call a tool {#call}&quot;">​</a></h3><p><code>call</code> invokes a server tool without a model turn:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk call &lt;tool&gt; [--input &lt;json&gt;]</span></span>
21
21
  <span class="line"><span> [--dir &lt;path&gt; | --url &lt;baseUrl&gt;]</span></span>
22
22
  <span class="line"><span> [--session &lt;id&gt;] [--slug &lt;slug&gt;]</span></span></code></pre></div><p><code>--input</code> accepts JSON and defaults to <code>{}</code>. <code>--session</code> uses the session workspace and records the call on its event stream. The command prints the server&#39;s JSON response and succeeds only when the HTTP response succeeds with <code>ok: true</code>.</p><p>Hosted deployments don&#39;t support <code>call</code>. Start a model turn with <code>run --prod</code> and check it with <a href="#session"><code>session</code></a>.</p><p>See <a href="./tools.html#call-a-tool-without-a-model-turn">Tools</a> for validation, busy-session behavior, and error codes.</p><h3 id="skill" tabindex="-1">Read a skill <a class="header-anchor" href="#skill" aria-label="Permalink to &quot;Read a skill {#skill}&quot;">​</a></h3><p><code>skill</code> reads an authored skill without a model turn:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk skill &lt;name&gt; [--dir &lt;path&gt; | --url &lt;baseUrl&gt;]</span></span>
23
23
  <span class="line"><span> [--slug &lt;slug&gt;] [--text]</span></span></code></pre></div><p>The default output is the server&#39;s JSON response. <code>--text</code> prints the rendered <code>SKILL.md</code> content.</p><h3 id="sessions" tabindex="-1">List sessions <a class="header-anchor" href="#sessions" aria-label="Permalink to &quot;List sessions {#sessions}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk sessions [--url &lt;baseUrl&gt;]</span></span>
24
- <span class="line"><span> [--slug &lt;slug&gt;] [--bearer-token &lt;token&gt;] [--json]</span></span></code></pre></div><p>Text output shows the session ID, channel, mode, turn count, running status, and update time. <code>--json</code> prints <code>{ sessions }</code>, including continuation tokens.</p><p>Hosted deployments don&#39;t support <code>sessions</code>. Find a hosted session in the deployment&#39;s <strong>Sessions</strong> list in the dashboard, then check it with <a href="#session"><code>session &lt;sessionId&gt; --prod</code></a>.</p><h3 id="session" tabindex="-1">Inspect a session <a class="header-anchor" href="#session" aria-label="Permalink to &quot;Inspect a session {#session}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk session &lt;sessionId&gt; [--url &lt;baseUrl&gt; | --prod]</span></span>
24
+ <span class="line"><span> [--slug &lt;slug&gt;] [--bearer-token &lt;token&gt;] [--json]</span></span></code></pre></div><p>Text output shows the session ID, channel, mode, turn count, running status, and update time. <code>--json</code> prints <code>{ sessions }</code>, including continuation tokens.</p><p>Hosted deployments don&#39;t support <code>sessions</code>. Find a hosted session ID in the <a href="#logs"><code>logs --prod</code></a> headers or the deployment&#39;s <strong>Sessions</strong> list in the dashboard, then check it with <a href="#session"><code>session &lt;sessionId&gt; --prod</code></a>.</p><h3 id="session" tabindex="-1">Inspect a session <a class="header-anchor" href="#session" aria-label="Permalink to &quot;Inspect a session {#session}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk session &lt;sessionId&gt; [--url &lt;baseUrl&gt; | --prod]</span></span>
25
25
  <span class="line"><span> [--slug &lt;slug&gt;] [--team &lt;id&gt;]</span></span>
26
26
  <span class="line"><span> [--json | --text | --events] [--out &lt;file.ndjson&gt;]</span></span>
27
27
  <span class="line"><span></span></span>
28
28
  <span class="line"><span>bdk session --prod [&lt;sessionId&gt;] --slug &lt;slug&gt; --message &lt;text&gt;</span></span>
29
- <span class="line"><span> [--dry-run] [--as-of &lt;instant&gt;] [--component &lt;key&gt;]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td>No output option</td><td>Print a compact trajectory.</td></tr><tr><td><code>--text</code></td><td>Select the compact trajectory explicitly.</td></tr><tr><td><code>--json</code></td><td>Print the trajectory object.</td></tr><tr><td><code>--events</code></td><td>Print <code>{ sessionId, events }</code> with the raw event list.</td></tr><tr><td><code>--out &lt;file.ndjson&gt;</code></td><td>Write the raw NDJSON trace instead of printing it.</td></tr><tr><td><code>--prod --message &lt;text&gt;</code></td><td>Start a hosted session or continue the supplied hosted session ID.</td></tr></tbody></table><p><code>--events</code> and <code>--json</code> are mutually exclusive. With <code>--prod</code>, the command prints the session&#39;s runs and logs in text or JSON, and <code>--events</code> and <code>--out</code> aren&#39;t available. While a hosted turn is running, text output also reports the event count so far and prints <code>Turn running; runs may lag behind events.</code> Use <a href="#resume"><code>resume</code></a> to continue a conversational session.</p><h3 id="logs" tabindex="-1">Follow logs <a class="header-anchor" href="#logs" aria-label="Permalink to &quot;Follow logs {#logs}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk logs [sessionId] [--url &lt;baseUrl&gt; | --prod]</span></span>
30
- <span class="line"><span> [--session &lt;sessionId&gt;] [--slug &lt;slug&gt;] [--once] [--json]</span></span></code></pre></div><p>The command follows logs until Ctrl-C. <code>--once</code> prints the current buffer and exits; <code>--json</code> emits newline-delimited JSON events. With <code>--prod</code>, it follows the output of the hosted deployment&#39;s most recent sessions and prints a <code>==&gt; &lt;sessionId&gt; (&lt;channel&gt;) &lt;==</code> header each time the output switches sessions. Pass a session ID, as an argument or with <code>--session</code>, to follow only that session. Hosted log events carry <code>sessionId</code> and <code>line</code> rather than <code>index</code> and <code>at</code>.</p><h3 id="cost" tabindex="-1">Report costs <a class="header-anchor" href="#cost" aria-label="Permalink to &quot;Report costs {#cost}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk cost [sessionId] [--url &lt;baseUrl&gt;]</span></span>
29
+ <span class="line"><span> [--team &lt;id&gt;] [--dry-run] [--as-of &lt;instant&gt;] [--component &lt;key&gt;]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td>No output option</td><td>Print a compact trajectory.</td></tr><tr><td><code>--text</code></td><td>Select the compact trajectory explicitly.</td></tr><tr><td><code>--json</code></td><td>Print the trajectory object.</td></tr><tr><td><code>--events</code></td><td>Print <code>{ sessionId, events }</code> with the raw event list.</td></tr><tr><td><code>--out &lt;file.ndjson&gt;</code></td><td>Write the raw NDJSON trace instead of printing it.</td></tr><tr><td><code>--prod --message &lt;text&gt;</code></td><td>Start a hosted session, or continue the supplied hosted session ID, with the same contract as <a href="#run"><code>run --prod</code></a>.</td></tr></tbody></table><p><code>--events</code> and <code>--json</code> are mutually exclusive. Use <a href="#resume"><code>resume</code></a> to continue a conversational session on a local or running server.</p><p>With <code>--prod</code>, the command prints the session&#39;s hosted executions: one line per run with its status, duration, and time, followed by that run&#39;s log lines. <code>--json</code> prints <code>{ sessionId, executions, startLog, ... }</code>. <code>--events</code> and <code>--out</code> aren&#39;t available. While a turn is running, text output also reports the event count and latest event type and prints <code>Turn running; runs may lag behind events.</code> A run can show <code>running</code> with no logs until the turn ends, so a growing event count is the progress signal.</p><h3 id="logs" tabindex="-1">Follow logs <a class="header-anchor" href="#logs" aria-label="Permalink to &quot;Follow logs {#logs}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk logs [sessionId] [--url &lt;baseUrl&gt; | --prod]</span></span>
30
+ <span class="line"><span> [--session &lt;sessionId&gt;] [--slug &lt;slug&gt;] [--team &lt;id&gt;] [--once] [--json]</span></span></code></pre></div><p>The command follows logs until Ctrl-C. <code>--once</code> prints the current buffer and exits; <code>--json</code> emits newline-delimited JSON events. With <code>--prod</code>, it follows the output of the hosted deployment&#39;s most recent sessions on every channel and prints a <code>==&gt; &lt;sessionId&gt; (&lt;channel&gt;) &lt;==</code> header each time the output switches sessions. Pass a session ID, as an argument or with <code>--session</code>, to follow only that session; a session ID requires <code>--prod</code>. Hosted log events carry <code>sessionId</code> and <code>line</code> rather than <code>index</code> and <code>at</code>.</p><h3 id="cost" tabindex="-1">Report costs <a class="header-anchor" href="#cost" aria-label="Permalink to &quot;Report costs {#cost}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk cost [sessionId] [--url &lt;baseUrl&gt;]</span></span>
31
31
  <span class="line"><span> [--slug &lt;slug&gt;] [--json]</span></span></code></pre></div><p>With a session ID, <code>cost</code> prints per-turn token usage and estimated cost. Without one, it prints one row per session and a total. Turns saved before cost tracking appear as unpriced. <code>--json</code> prints the underlying report or <code>{ sessions }</code> for an aggregate.</p><h3 id="playground" tabindex="-1">Open the playground <a class="header-anchor" href="#playground" aria-label="Permalink to &quot;Open the playground {#playground}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk playground [--url &lt;baseUrl&gt; | --prod] [--session &lt;id&gt;]</span></span>
32
- <span class="line"><span> [--slug &lt;slug&gt;] [--team &lt;id&gt;] [--bearer-token &lt;token&gt;] [--print]</span></span></code></pre></div><p>The command prints the playground URL and opens it unless <code>--print</code> is set. <code>--session</code> opens a deep link. A running target with credentials that a browser can&#39;t send starts a loopback proxy and stays open until Ctrl-C. <code>--session</code> links for a hosted deployment may not open yet; check that session with <a href="#session"><code>session &lt;sessionId&gt; --prod</code></a> instead.</p><h3 id="trajectory" tabindex="-1">Inspect a trajectory <a class="header-anchor" href="#trajectory" aria-label="Permalink to &quot;Inspect a trajectory {#trajectory}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk trajectory --events &lt;file.ndjson&gt; [--text]</span></span></code></pre></div><p>The command converts an NDJSON stream into the trajectory JSON returned by <code>run</code>. <code>--text</code> prints the compact view.</p><h2 id="evals" tabindex="-1">Evals <a class="header-anchor" href="#evals" aria-label="Permalink to &quot;Evals&quot;">​</a></h2><h3 id="eval" tabindex="-1">Run evals <a class="header-anchor" href="#eval" aria-label="Permalink to &quot;Run evals {#eval}&quot;">​</a></h3><p><code>eval</code> discovers <code>evals/**/*.eval.{ts,js}</code> and runs selected cases:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk eval [--dir &lt;path&gt;] [evalId...]</span></span>
32
+ <span class="line"><span> [--slug &lt;slug&gt;] [--team &lt;id&gt;] [--bearer-token &lt;token&gt;] [--print]</span></span></code></pre></div><p>The command prints the playground URL and opens it unless <code>--print</code> is set. <code>--session</code> opens a deep link. A running target with credentials that a browser can&#39;t send starts a loopback proxy and stays open until Ctrl-C. With <code>--prod</code>, the URL opens the deployment&#39;s playground under <strong>Deployed Agents</strong> in the dashboard.</p><h3 id="trajectory" tabindex="-1">Inspect a trajectory <a class="header-anchor" href="#trajectory" aria-label="Permalink to &quot;Inspect a trajectory {#trajectory}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk trajectory --events &lt;file.ndjson&gt; [--text]</span></span></code></pre></div><p>The command converts an NDJSON stream into the trajectory JSON returned by <code>run</code>. <code>--text</code> prints the compact view.</p><h2 id="evals" tabindex="-1">Evals <a class="header-anchor" href="#evals" aria-label="Permalink to &quot;Evals&quot;">​</a></h2><h3 id="eval" tabindex="-1">Run evals <a class="header-anchor" href="#eval" aria-label="Permalink to &quot;Run evals {#eval}&quot;">​</a></h3><p><code>eval</code> discovers <code>evals/**/*.eval.{ts,js}</code> and runs selected cases:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk eval [--dir &lt;path&gt;] [evalId...]</span></span>
33
33
  <span class="line"><span> [--list] [--tag &lt;tag&gt;]... [--json] [--verbose]</span></span>
34
34
  <span class="line"><span> [--timeout-ms &lt;n&gt;] [--strict] [--max-concurrency &lt;n&gt;]</span></span>
35
35
  <span class="line"><span> [--junit &lt;path&gt;] [--artifacts &lt;dir&gt; | --no-artifacts]</span></span>
@@ -43,16 +43,19 @@ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON
43
43
  <span class="line"><span>bdk -V</span></span></code></pre></div><p>Text output is the version number. <code>--json</code> prints <code>{ name, version }</code>.</p><h3 id="update" tabindex="-1">Update the CLI <a class="header-anchor" href="#update" aria-label="Permalink to &quot;Update the CLI {#update}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk update</span></span></code></pre></div><p><code>update</code> checks npm&#39;s <code>latest</code> tag and upgrades a recognized global or project install with its package manager. If it can&#39;t identify an installed copy, it prints a manual upgrade command instead.</p><p>Published installs check for updates at most once every 24 hours. Set <code>AGENT_SERVE_NO_UPDATE_CHECK</code>, <code>NO_UPDATE_NOTIFIER</code>, or <code>CI</code> to disable the automatic warning.</p><h2 id="managed-hosting" tabindex="-1">Managed hosting <a class="header-anchor" href="#managed-hosting" aria-label="Permalink to &quot;Managed hosting&quot;">​</a></h2><h3 id="deploy" tabindex="-1">Deploy agents <a class="header-anchor" href="#deploy" aria-label="Permalink to &quot;Deploy agents {#deploy}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk deploy [--dir &lt;path&gt;] [--slug &lt;slug&gt; | --all] [--team &lt;id&gt;]</span></span>
44
44
  <span class="line"><span> [--repo &lt;https-url&gt;] [--ref &lt;git-ref&gt;] [--path &lt;agent-path&gt;]</span></span>
45
45
  <span class="line"><span> [--cursor-events-repo &lt;owner/name&gt;]...</span></span>
46
- <span class="line"><span> [--allow-domain &lt;domain&gt;]... [--no-wait] [--json]</span></span></code></pre></div><p>Managed hosting requires a team with agent hosting enabled. A team service-account API key with agent access can deploy.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--slug &lt;slug&gt;</code></td><td>Select one project and set its deployment slug.</td></tr><tr><td><code>--all</code></td><td>Deploy every child project under a multi-agent <code>--dir</code>. Mutually exclusive with <code>--slug</code>.</td></tr><tr><td><code>--team &lt;id&gt;</code></td><td>Select the Cursor team.</td></tr><tr><td><code>--repo &lt;https-url&gt;</code></td><td>Set the source repository. The CLI infers it from the current checkout when possible. HTTPS is required.</td></tr><tr><td><code>--ref &lt;git-ref&gt;</code></td><td>Set the source Git ref. The CLI infers the current branch when possible.</td></tr><tr><td><code>--path &lt;agent-path&gt;</code></td><td>Set the project path relative to the repository root.</td></tr><tr><td><code>--cursor-events-repo &lt;owner/name&gt;</code></td><td>Watch a repository&#39;s Cursor events. Repeat the flag for each repository; the repositories you pass replace the previous list. Without the flag, the deployment watches its GitHub source repository.</td></tr><tr><td><code>--allow-domain &lt;domain&gt;</code></td><td>Add an egress hostname. Repeat for multiple domains; values are combined with <code>hosting.egressDomains</code>.</td></tr><tr><td><code>--no-wait</code></td><td>Return after the deployment request is accepted.</td></tr><tr><td><code>--json</code></td><td>Print one object for one target or an array for multiple targets.</td></tr></tbody></table><p>Deployment slugs contain lowercase letters, digits, <code>_</code>, or <code>-</code>, start with a letter or digit, and have at most 64 characters. Egress entries are lowercase hostnames with an alphabetic top-level domain; one leading <code>*.</code> wildcard is allowed, or a trailing <code>:port</code> for a protocol that is not HTTPS, with at most 64 entries.</p><p>By default, <code>deploy</code> waits until the deployment is running and exits nonzero if it reaches a failed state. A first deployment can return an alias token once. Store it as a secret and send it as <code>X-Agent-Alias-Token</code> when calling the stable alias URL.</p><h3 id="deployments" tabindex="-1">List deployments <a class="header-anchor" href="#deployments" aria-label="Permalink to &quot;List deployments {#deployments}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk deployments [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>Text output shows slug, status, generation, kind, and update time. <code>--json</code> prints <code>{ deployments }</code>. An empty list succeeds.</p><h3 id="deployment" tabindex="-1">Inspect a deployment <a class="header-anchor" href="#deployment" aria-label="Permalink to &quot;Inspect a deployment {#deployment}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk deployment &lt;slug&gt; [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>Text output includes status, source, routes, secret names, egress domains, and the latest error. <code>--json</code> can include short-lived access headers, so handle its output as a credential.</p><h3 id="stop" tabindex="-1">Stop a deployment <a class="header-anchor" href="#stop" aria-label="Permalink to &quot;Stop a deployment {#stop}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk stop &lt;slug&gt; [--team &lt;id&gt;] [--no-wait] [--cancel-runs] [--json]</span></span></code></pre></div><p>The command waits for <code>stopped</code> by default. <code>--no-wait</code> returns after the request is accepted. <code>--cancel-runs</code> also requests cancellation of active runs and reminder wakes.</p><h3 id="cancel-runs" tabindex="-1">Cancel active runs <a class="header-anchor" href="#cancel-runs" aria-label="Permalink to &quot;Cancel active runs {#cancel-runs}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk cancel-runs &lt;slug&gt; [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>The command requests cancellation for a deployment&#39;s active runs and reminder wakes. It exits nonzero if any cancellation request fails to start.</p><h3 id="event-repos" tabindex="-1">Replace event repositories <a class="header-anchor" href="#event-repos" aria-label="Permalink to &quot;Replace event repositories {#event-repos}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk event-repos &lt;slug&gt; [--repo &lt;owner/name&gt;]...</span></span>
46
+ <span class="line"><span> [--allow-domain &lt;domain&gt;]... [--no-wait] [--json]</span></span></code></pre></div><p>Managed hosting requires a team with agent hosting enabled. A team service-account API key with agent access can deploy.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--slug &lt;slug&gt;</code></td><td>Select one project and set its deployment slug.</td></tr><tr><td><code>--all</code></td><td>Deploy every child project under a multi-agent <code>--dir</code>. Mutually exclusive with <code>--slug</code>.</td></tr><tr><td><code>--team &lt;id&gt;</code></td><td>Select the Cursor team.</td></tr><tr><td><code>--repo &lt;https-url&gt;</code></td><td>Set the source repository. The CLI infers it from the current checkout when possible. HTTPS is required.</td></tr><tr><td><code>--ref &lt;git-ref&gt;</code></td><td>Set the source Git ref. The CLI infers the current branch when possible.</td></tr><tr><td><code>--path &lt;agent-path&gt;</code></td><td>Set the project path relative to the repository root.</td></tr><tr><td><code>--cursor-events-repo &lt;owner/name&gt;</code></td><td>Watch a repository&#39;s Cursor events. Repeat the flag for each repository; the repositories you pass replace the previous list. Without the flag, the deployment watches its GitHub source repository.</td></tr><tr><td><code>--allow-domain &lt;domain&gt;</code></td><td>Add an egress hostname. Repeat for multiple domains; values are combined with <code>hosting.egressDomains</code>.</td></tr><tr><td><code>--no-wait</code></td><td>Return after the deployment request is accepted.</td></tr><tr><td><code>--json</code></td><td>Print one object for one target or an array for multiple targets.</td></tr></tbody></table><p>Deployment slugs contain lowercase letters, digits, <code>_</code>, or <code>-</code>, start with a letter or digit, and have at most 64 characters. Egress entries are lowercase hostnames with an alphabetic top-level domain; one leading <code>*.</code> wildcard is allowed, or a trailing <code>:port</code> for a protocol that is not HTTPS, with at most 64 entries.</p><p>By default, <code>deploy</code> waits until the deployment is running and exits nonzero if it reaches a failed state. A first deployment can return an alias token once. Store it as a secret and send it as <code>X-Agent-Alias-Token</code> when calling the stable alias URL.</p><h3 id="deployments" tabindex="-1">List deployments <a class="header-anchor" href="#deployments" aria-label="Permalink to &quot;List deployments {#deployments}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk deployments [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>Text output shows slug, status, generation, kind, and update time. <code>--json</code> prints <code>{ deployments }</code>. An empty list succeeds.</p><h3 id="deployment" tabindex="-1">Inspect a deployment <a class="header-anchor" href="#deployment" aria-label="Permalink to &quot;Inspect a deployment {#deployment}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk deployment &lt;slug&gt; [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>Text output includes status, source, routes, secret names, egress domains, and the latest error. <code>--json</code> can include short-lived access headers, so handle its output as a credential.</p><h3 id="stop" tabindex="-1">Stop a deployment <a class="header-anchor" href="#stop" aria-label="Permalink to &quot;Stop a deployment {#stop}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk stop &lt;slug&gt; [--team &lt;id&gt;] [--no-wait] [--cancel-runs] [--json]</span></span></code></pre></div><p>The command waits for <code>stopped</code> by default. <code>--no-wait</code> returns after the request is accepted. <code>--cancel-runs</code> also requests cancellation of active runs and reminder wakes.</p><h3 id="start" tabindex="-1">Start a deployment <a class="header-anchor" href="#start" aria-label="Permalink to &quot;Start a deployment {#start}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk start &lt;slug&gt; [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p><code>start</code> resumes a stopped deployment. It doesn&#39;t remove the deploy lock that <a href="#kill"><code>kill</code></a> sets.</p><h3 id="kill" tabindex="-1">Kill a deployment <a class="header-anchor" href="#kill" aria-label="Permalink to &quot;Kill a deployment {#kill}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk kill &lt;slug&gt; [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>Use <code>kill</code> in an emergency. It locks deploys of the slug, stops the deployment, and requests cancellation of its active runs and reminder wakes. To bring the deployment back, run <a href="#unlock-deploys"><code>unlock-deploys</code></a> and then <a href="#start"><code>start</code></a>.</p><h3 id="unlock-deploys" tabindex="-1">Unlock deploys <a class="header-anchor" href="#unlock-deploys" aria-label="Permalink to &quot;Unlock deploys {#unlock-deploys}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk unlock-deploys &lt;slug&gt; [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p><code>unlock-deploys</code> removes the lock that <code>kill</code> sets, so <code>deploy</code>, <code>upgrade</code>, and <code>rollback</code> work for the slug again. It doesn&#39;t resume traffic; run <code>start</code> for that.</p><h3 id="cancel-runs" tabindex="-1">Cancel active runs <a class="header-anchor" href="#cancel-runs" aria-label="Permalink to &quot;Cancel active runs {#cancel-runs}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk cancel-runs &lt;slug&gt; [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>The command requests cancellation for a deployment&#39;s active runs and reminder wakes. It exits nonzero if any cancellation request fails to start.</p><h3 id="event-repos" tabindex="-1">Replace event repositories <a class="header-anchor" href="#event-repos" aria-label="Permalink to &quot;Replace event repositories {#event-repos}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk event-repos &lt;slug&gt; [--repo &lt;owner/name&gt;]...</span></span>
47
47
  <span class="line"><span> [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>The supplied repositories replace the deployment&#39;s complete event repository list; they aren&#39;t merged with the previous list. Omit <code>--repo</code> to clear the list.</p><h3 id="upgrade" tabindex="-1">Upgrade a deployment <a class="header-anchor" href="#upgrade" aria-label="Permalink to &quot;Upgrade a deployment {#upgrade}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk upgrade &lt;slug&gt; [--release &lt;id-or-version&gt;]</span></span>
48
- <span class="line"><span> [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p><code>--release</code> accepts a release ID or version. Omit it to select the newest ready release. <code>--json</code> prints <code>{ releaseId }</code>.</p><h3 id="delete" tabindex="-1">Delete a deployment <a class="header-anchor" href="#delete" aria-label="Permalink to &quot;Delete a deployment {#delete}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk delete &lt;slug&gt; [--team &lt;id&gt;] [--no-wait] [--json]</span></span></code></pre></div><p><code>delete</code> removes the deployment and frees its slug. It waits until the deployment is gone unless <code>--no-wait</code> is set.</p><h3 id="rotate-token" tabindex="-1">Rotate an alias token <a class="header-anchor" href="#rotate-token" aria-label="Permalink to &quot;Rotate an alias token {#rotate-token}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk rotate-token &lt;slug&gt; [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>The old token stops working immediately. The replacement appears once; <code>--json</code> prints <code>{ aliasToken }</code>.</p><h3 id="secrets" tabindex="-1">Manage deployment secrets <a class="header-anchor" href="#secrets" aria-label="Permalink to &quot;Manage deployment secrets {#secrets}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk secrets set &lt;slug&gt; NAME [NAME2 ...]</span></span>
48
+ <span class="line"><span> [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p><code>--release</code> accepts a release ID or version. Omit it to select the newest ready release. <code>--json</code> prints <code>{ releaseId }</code>.</p><h3 id="rollback" tabindex="-1">Roll back a deployment <a class="header-anchor" href="#rollback" aria-label="Permalink to &quot;Roll back a deployment {#rollback}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk rollback &lt;slug&gt; [--release &lt;id-or-version&gt;]</span></span>
49
+ <span class="line"><span> [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p><code>rollback</code> moves the deployment to an earlier ready release without building a new one. Omit <code>--release</code> to select the release before the current one. <code>--json</code> prints <code>{ releaseId }</code>.</p><h3 id="delete" tabindex="-1">Delete a deployment <a class="header-anchor" href="#delete" aria-label="Permalink to &quot;Delete a deployment {#delete}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk delete &lt;slug&gt; [--team &lt;id&gt;] [--no-wait] [--json]</span></span></code></pre></div><p><code>delete</code> removes the deployment and frees its slug. It waits until the deployment is gone unless <code>--no-wait</code> is set.</p><h3 id="rotate-token" tabindex="-1">Rotate an alias token <a class="header-anchor" href="#rotate-token" aria-label="Permalink to &quot;Rotate an alias token {#rotate-token}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk rotate-token &lt;slug&gt; [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>The old token stops working immediately. The replacement appears once; <code>--json</code> prints <code>{ aliasToken }</code>.</p><h3 id="secrets" tabindex="-1">Manage deployment secrets <a class="header-anchor" href="#secrets" aria-label="Permalink to &quot;Manage deployment secrets {#secrets}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk secrets set &lt;slug&gt; NAME [NAME2 ...]</span></span>
49
50
  <span class="line"><span> [--team &lt;id&gt;] [--from-argv] [--json]</span></span>
50
51
  <span class="line"><span>bdk secrets list &lt;slug&gt; [--team &lt;id&gt;] [--json]</span></span>
51
- <span class="line"><span>bdk secrets unset &lt;slug&gt; NAME [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>Pass secret names to <code>set</code>. On a TTY, the CLI prompts for a hidden value and ends that value at the first newline. With one name, redirected stdin is the whole value and one trailing newline is removed, so a PEM private key keeps its line breaks:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> secrets</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> set</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> my-bot</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> GITHUB_APP_PRIVATE_KEY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./app.private-key.pem</span></span></code></pre></div><p>With several names, provide one line per name. <code>set</code> rejects <code>NAME=VALUE</code> on the command line unless <code>--from-argv</code> is set, because those values can enter shell history and captured terminals.</p><p>Names use <code>UPPER_SNAKE_CASE</code>, start with a letter, and contain at most 64 characters. Names beginning with <code>CURSOR_</code> are reserved. Values contain at most 4096 bytes, and each deployment holds at most 32 secrets.</p><p><code>list</code> returns names and creation times, never values. JSON output is <code>{ secretNames }</code> for <code>set</code>, <code>{ secrets }</code> for <code>list</code>, and <code>{ removed }</code> for <code>unset</code>. Changes are available to subsequent hosted work.</p><h2 id="mcp-connections" tabindex="-1">MCP connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP connections&quot;">​</a></h2><h3 id="mcp" tabindex="-1">Connect an MCP client <a class="header-anchor" href="#mcp" aria-label="Permalink to &quot;Connect an MCP client {#mcp}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk mcp --url &lt;baseUrl&gt; [--bearer-token &lt;token&gt;]</span></span>
52
+ <span class="line"><span>bdk secrets unset &lt;slug&gt; NAME [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>Pass secret names to <code>set</code>. On a TTY, the CLI prompts for a hidden value and ends that value at the first newline. With one name, redirected stdin is the whole value and one trailing newline is removed, so a PEM private key keeps its line breaks:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> secrets</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> set</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> my-bot</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> GITHUB_APP_PRIVATE_KEY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./app.private-key.pem</span></span></code></pre></div><p>With several names, provide one line per name. <code>set</code> rejects <code>NAME=VALUE</code> on the command line unless <code>--from-argv</code> is set, because those values can enter shell history and captured terminals.</p><p>Names use <code>UPPER_SNAKE_CASE</code>, start with a letter, and contain at most 64 characters. Names beginning with <code>CURSOR_</code> are reserved. Values contain at most 4096 bytes, and each deployment holds at most 32 secrets.</p><p><code>list</code> returns names and creation times, never values. JSON output is <code>{ secretNames }</code> for <code>set</code>, <code>{ secrets }</code> for <code>list</code>, and <code>{ removed }</code> for <code>unset</code>. Changes are available to subsequent hosted work.</p><h3 id="images" tabindex="-1">Manage container images <a class="header-anchor" href="#images" aria-label="Permalink to &quot;Manage container images {#images}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk images push &lt;local-image&gt; --name &lt;name&gt; [--team &lt;id&gt;] [--json]</span></span>
53
+ <span class="line"><span>bdk images list [--team &lt;id&gt;] [--json]</span></span>
54
+ <span class="line"><span>bdk images rm &lt;name&gt; [--team &lt;id&gt;] [--json]</span></span></code></pre></div><p>A persistent agent can run inside a container image that your team pushes and names in <code>hosting.image</code>. <code>push</code> needs Docker on your machine. It checks the local image first: the image must be <code>linux/amd64</code> and have <code>bash</code>, <code>git</code>, <code>node</code> 22.13 or newer, and <code>npm</code> on <code>PATH</code>. The command then compresses the image and uploads it under <code>--name</code>.</p><p><code>list</code> shows the team&#39;s images and how many the team can keep, and <code>rm</code> deletes one image. A deploy pins the image it uses, so after you push a new image under the same name, deploy again to pick it up.</p><h2 id="mcp-connections" tabindex="-1">MCP connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP connections&quot;">​</a></h2><h3 id="mcp" tabindex="-1">Connect an MCP client <a class="header-anchor" href="#mcp" aria-label="Permalink to &quot;Connect an MCP client {#mcp}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk mcp --url &lt;baseUrl&gt; [--bearer-token &lt;token&gt;]</span></span>
52
55
  <span class="line"><span></span></span>
53
56
  <span class="line"><span>bdk mcp install --url &lt;baseUrl&gt; [--bearer-token &lt;token&gt;]</span></span>
54
- <span class="line"><span> [--name &lt;server-name&gt;] [--print] [--json]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>mcp</code></td><td>Read newline-delimited JSON-RPC from stdin and proxy it to the selected agent&#39;s MCP endpoint. stdout is reserved for MCP messages. A target is required.</td></tr><tr><td><code>mcp install</code></td><td>Add the selected agent to <code>~/.cursor/mcp.json</code>. <code>--name</code> sets the server name, <code>--print</code> previews the entry, and <code>--json</code> prints a machine-readable result. A <code>--url</code> entry with <code>--bearer-token</code> contains that token; handle printed and written copies as credentials.</td></tr></tbody></table><h3 id="mcp-oauth" tabindex="-1">Authorize MCP OAuth <a class="header-anchor" href="#mcp-oauth" aria-label="Permalink to &quot;Authorize MCP OAuth {#mcp-oauth}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk mcp oauth &lt;connection&gt; [--dir &lt;path&gt;] [--store]</span></span>
55
- <span class="line"><span> [--slug &lt;slug&gt;] [--team &lt;id&gt;]</span></span></code></pre></div><p><code>&lt;connection&gt;</code> is the basename under <code>bot/mcp-connections/</code> or <code>bot/host-connections/</code>.</p><table tabindex="0"><thead><tr><th>Connection</th><th>Result</th></tr></thead><tbody><tr><td><code>defineConnection({ url, oauth: true })</code></td><td>Open a browser PKCE flow and save tokens in <code>mcp-auth.json</code> under the CLI config directory. <code>--store</code> also sets the matching deployment secrets.</td></tr><tr><td><code>defineConnection({ cursorAccount: true })</code></td><td>Authorize the hosted deployment&#39;s service account through Cursor. <code>--store</code> isn&#39;t needed.</td></tr></tbody></table><p>Stored secret names are <code>MCP_OAUTH_&lt;NAME&gt;_ACCESS_TOKEN</code>, <code>MCP_OAUTH_&lt;NAME&gt;_REFRESH_TOKEN</code>, and <code>MCP_OAUTH_&lt;NAME&gt;_CLIENT_ID</code>. Declare them in <code>hosting.secretNames</code>. URL-connection tokens are bound to the resource URL; authorize again after changing it.</p><p>See <a href="./../guides/mcp-oauth.html">Host MCP OAuth</a> for the full setup flow.</p><h2 id="channel-helpers" tabindex="-1">Channel helpers <a class="header-anchor" href="#channel-helpers" aria-label="Permalink to &quot;Channel helpers&quot;">​</a></h2><h3 id="slack" tabindex="-1">Configure Slack <a class="header-anchor" href="#slack" aria-label="Permalink to &quot;Configure Slack {#slack}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk slack setup</span></span>
57
+ <span class="line"><span> [--name &lt;server-name&gt;] [--print] [--json]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>mcp</code></td><td>Read newline-delimited JSON-RPC from stdin and proxy it to the selected agent&#39;s MCP endpoint. stdout is reserved for MCP messages. A target is required.</td></tr><tr><td><code>mcp install</code></td><td>Add the selected agent to <code>~/.cursor/mcp.json</code>. <code>--name</code> sets the server name, <code>--print</code> previews the entry, and <code>--json</code> prints a machine-readable result. A <code>--url</code> entry with <code>--bearer-token</code> contains that token; handle printed and written copies as credentials.</td></tr></tbody></table><p>Hosted deployments don&#39;t support <code>mcp</code> or <code>mcp install</code>; both report that the deployment doesn&#39;t support the command when you pass <code>--prod</code>.</p><h3 id="mcp-oauth" tabindex="-1">Authorize MCP OAuth <a class="header-anchor" href="#mcp-oauth" aria-label="Permalink to &quot;Authorize MCP OAuth {#mcp-oauth}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk mcp oauth &lt;connection&gt; [--dir &lt;path&gt;]</span></span>
58
+ <span class="line"><span> [--slug &lt;slug&gt;] [--team &lt;id&gt;]</span></span></code></pre></div><p><code>&lt;connection&gt;</code> is the basename under <code>bot/mcp-connections/</code> or <code>bot/host-connections/</code>.</p><table tabindex="0"><thead><tr><th>Connection</th><th>Result</th></tr></thead><tbody><tr><td><code>defineConnection({ url, oauth: true })</code></td><td>Open a browser PKCE flow and save tokens in <code>mcp-auth.json</code> under the CLI config directory.</td></tr><tr><td><code>defineConnection({ cursorAccount: true })</code></td><td>Authorize the hosted deployment&#39;s service account through Cursor.</td></tr></tbody></table><p>URL-connection tokens are bound to the resource URL; authorize again after changing it.</p><p>See <a href="./../guides/mcp-oauth.html">Host MCP OAuth</a> for the full setup flow.</p><h2 id="channel-helpers" tabindex="-1">Channel helpers <a class="header-anchor" href="#channel-helpers" aria-label="Permalink to &quot;Channel helpers&quot;">​</a></h2><h3 id="slack" tabindex="-1">Configure Slack <a class="header-anchor" href="#slack" aria-label="Permalink to &quot;Configure Slack {#slack}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk slack setup</span></span>
56
59
  <span class="line"><span>bdk slack create [--dir &lt;path&gt;] [--name &lt;name&gt;] [--prod]</span></span>
57
60
  <span class="line"><span> [--slack-team &lt;id&gt;] [--team &lt;id&gt;] [--icon &lt;url-or-file&gt;]</span></span>
58
61
  <span class="line"><span> [--prefix &lt;prefix&gt; | --no-prefix] [--channel-posts] [--json]</span></span>
@@ -89,4 +92,4 @@ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON
89
92
  <span class="line"><span> [--url &lt;url&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;]</span></span>
90
93
  <span class="line"><span> [--secret &lt;secret&gt;] [--dry-run] [--out &lt;dir&gt;] [--json]</span></span>
91
94
  <span class="line"><span>bdk bitbucket events [--dir &lt;path&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;] [--json]</span></span>
92
- <span class="line"><span>bdk bitbucket forward [--dir &lt;path&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Subcommand</th><th>Contract</th></tr></thead><tbody><tr><td><code>replay</code></td><td>Read a pull request, synthesize webhook payloads in the host&#39;s Cloud or Data Center format, and post them to matching channels.</td></tr><tr><td><code>events</code></td><td>List discovered Bitbucket channel URLs and event keys.</td></tr><tr><td><code>forward</code></td><td>Print the repository-hook and tunnel recipe for live deliveries.</td></tr></tbody></table><p>Replay supports <code>pullrequest:created</code>, <code>pullrequest:updated</code>, <code>pullrequest:comment_created</code>, and <code>repo:push</code>, along with their supported Data Center forms. It requires <code>BITBUCKET_TOKEN</code> with pull-request read access. <code>--secret</code> defaults to <code>BITBUCKET_WEBHOOK_SECRET</code>; <code>--dry-run</code> and <code>--out</code> follow the GitHub replay contract.</p><p>See <a href="./../guides/bitbucket.html">Bitbucket</a> for Cloud and Data Center setup.</p><h2 id="environment-variables" tabindex="-1">Environment variables <a class="header-anchor" href="#environment-variables" aria-label="Permalink to &quot;Environment variables&quot;">​</a></h2><p>Credential resolution follows this order: <code>--api-key</code>, <code>CURSOR_API_KEY</code>, <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, then the stored login.</p><table tabindex="0"><thead><tr><th>Variable</th><th>Contract</th></tr></thead><tbody><tr><td><code>CURSOR_API_KEY</code></td><td>Cursor credential.</td></tr><tr><td><code>CURSOR_API_KEY_FILE</code></td><td>Path to a Cursor credential file.</td></tr><tr><td><code>CURSOR_SERVICE_ACCOUNT_KEY</code></td><td>Team service-account credential used after the API key and key-file sources.</td></tr><tr><td><code>CURSOR_API_BASE_URL</code></td><td>Backend for login, account, deployment, and event commands.</td></tr><tr><td><code>CURSOR_BACKEND_URL</code></td><td>Backend for BDK turns. Set it with <code>CURSOR_API_BASE_URL</code> when using a non-default backend.</td></tr><tr><td><code>AGENT_SERVE_CONFIG_DIR</code></td><td>Override the CLI config directory for stored credentials and update state.</td></tr><tr><td><code>AGENT_SERVE_NO_UPDATE_CHECK</code>, <code>NO_UPDATE_NOTIFIER</code>, <code>CI</code></td><td>Disable published-version checks when set to a non-empty value other than <code>0</code>.</td></tr><tr><td><code>GITHUB_WEBHOOK_SECRET</code></td><td>Default signature secret for GitHub forwarding and replay.</td></tr><tr><td><code>GITHUB_APP_ID</code>, <code>GITHUB_APP_PRIVATE_KEY</code>, <code>GITHUB_APP_INSTALLATION_ID</code></td><td>GitHub App credentials for outbound API calls.</td></tr><tr><td><code>GITHUB_TOKEN</code>, <code>GH_TOKEN</code></td><td>Token credentials for outbound GitHub calls. Unset both for <code>github forward</code>.</td></tr><tr><td><code>GITLAB_TOKEN</code></td><td>Token for GitLab API reads and direct channel calls.</td></tr><tr><td><code>GITLAB_API_BASE_URL</code></td><td>Override the GitLab REST base URL for self-managed hosts.</td></tr><tr><td><code>GITLAB_WEBHOOK_SECRET</code></td><td>Default GitLab webhook token for replay and channel verification.</td></tr><tr><td><code>BITBUCKET_TOKEN</code></td><td>Token for Bitbucket API reads and direct channel calls.</td></tr><tr><td><code>BITBUCKET_API_BASE_URL</code></td><td>Override the Bitbucket Data Center REST base URL.</td></tr><tr><td><code>BITBUCKET_WEBHOOK_SECRET</code></td><td>Default Bitbucket signing secret for replay and channel verification.</td></tr><tr><td><code>SLACK_BOT_TOKEN</code>, <code>SLACK_APP_TOKEN</code></td><td>Slack tokens for one agent. Multi-agent servers use <code>&lt;PREFIX&gt;_SLACK_BOT_TOKEN</code> and <code>&lt;PREFIX&gt;_SLACK_APP_TOKEN</code>.</td></tr></tbody></table><h2 id="exit-status" tabindex="-1">Exit status <a class="header-anchor" href="#exit-status" aria-label="Permalink to &quot;Exit status&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Command</th><th>Nonzero contract</th></tr></thead><tbody><tr><td>No command</td><td>Print help and exit <code>1</code>. Explicit <code>help</code>, <code>--help</code>, and <code>-h</code> exit <code>0</code>.</td></tr><tr><td><code>run</code></td><td>For local and running-server trajectories, exit <code>1</code> when the trajectory fails.</td></tr><tr><td><code>call</code></td><td>Exit <code>1</code> unless the response succeeds with <code>ok: true</code>.</td></tr><tr><td><code>skill</code></td><td>Exit <code>2</code> when the name is missing and <code>1</code> when the request fails.</td></tr><tr><td><code>trajectory</code></td><td>Exit <code>1</code> when the reconstructed trajectory failed.</td></tr><tr><td><code>eval</code></td><td>Exit <code>1</code> for failed cases, or scored cases below threshold with <code>--strict</code>; exit <code>2</code> for invalid eval options or an execution with no matching cases. An empty <code>--list</code> succeeds.</td></tr><tr><td><code>eval status</code></td><td>Exit <code>3</code> while the batch runs, <code>1</code> when it failed or was cancelled, and <code>2</code> for invalid usage.</td></tr><tr><td><code>chat</code>, <code>session</code></td><td>Exit <code>2</code> for documented option conflicts or missing required input.</td></tr><tr><td><code>validate</code></td><td>Exit <code>1</code> when any project diagnostic has error severity.</td></tr><tr><td><code>convert-automation</code></td><td>Exit <code>1</code> for invalid input, authentication, export, or file-write failure. Warnings and dependency-install failure don&#39;t change a successful conversion exit.</td></tr><tr><td><code>migrate</code></td><td>Exit <code>0</code> after starting with <code>--no-wait</code> or after the agent opens a pull request. Exit <code>1</code> for invalid input, authentication or agent failure, or a completed run without a pull request.</td></tr><tr><td>Other commands</td><td>Exit nonzero when validation, authentication, a request, or the requested operation fails.</td></tr></tbody></table><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./project-layout.html">Project layout</a></li><li><a href="./sessions.html">Sessions, events, and streaming</a></li><li><a href="./evals.html">Evals</a></li><li><a href="./http-api.html">HTTP API</a></li><li><a href="./../deployment.html">Deployment</a></li><li><a href="./../guides/migrate.html">Early-alpha migration</a></li></ul>`,204)])])}const g=t(d,[["render",n]]);export{u as __pageData,g as default};
95
+ <span class="line"><span>bdk bitbucket forward [--dir &lt;path&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Subcommand</th><th>Contract</th></tr></thead><tbody><tr><td><code>replay</code></td><td>Read a pull request, synthesize webhook payloads in the host&#39;s Cloud or Data Center format, and post them to matching channels.</td></tr><tr><td><code>events</code></td><td>List discovered Bitbucket channel URLs and event keys.</td></tr><tr><td><code>forward</code></td><td>Print the repository-hook and tunnel recipe for live deliveries.</td></tr></tbody></table><p>Replay supports <code>pullrequest:created</code>, <code>pullrequest:updated</code>, <code>pullrequest:comment_created</code>, and <code>repo:push</code>, along with their supported Data Center forms. It requires <code>BITBUCKET_TOKEN</code> with pull-request read access. <code>--secret</code> defaults to <code>BITBUCKET_WEBHOOK_SECRET</code>; <code>--dry-run</code> and <code>--out</code> follow the GitHub replay contract.</p><p>See <a href="./../guides/bitbucket.html">Bitbucket</a> for Cloud and Data Center setup.</p><h2 id="environment-variables" tabindex="-1">Environment variables <a class="header-anchor" href="#environment-variables" aria-label="Permalink to &quot;Environment variables&quot;">​</a></h2><p>Credential resolution follows this order: <code>--api-key</code>, <code>CURSOR_API_KEY</code>, <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, then the stored login.</p><table tabindex="0"><thead><tr><th>Variable</th><th>Contract</th></tr></thead><tbody><tr><td><code>CURSOR_API_KEY</code></td><td>Cursor credential.</td></tr><tr><td><code>CURSOR_API_KEY_FILE</code></td><td>Path to a Cursor credential file.</td></tr><tr><td><code>CURSOR_SERVICE_ACCOUNT_KEY</code></td><td>Team service-account credential used after the API key and key-file sources.</td></tr><tr><td><code>CURSOR_API_BASE_URL</code></td><td>Backend for login, account, deployment, and event commands.</td></tr><tr><td><code>CURSOR_BACKEND_URL</code></td><td>Backend for BDK turns. Set it with <code>CURSOR_API_BASE_URL</code> when using a non-default backend.</td></tr><tr><td><code>AGENT_SERVE_CONFIG_DIR</code></td><td>Override the CLI config directory for stored credentials and update state.</td></tr><tr><td><code>AGENT_SERVE_NO_UPDATE_CHECK</code>, <code>NO_UPDATE_NOTIFIER</code>, <code>CI</code></td><td>Disable published-version checks when set to a non-empty value other than <code>0</code>.</td></tr><tr><td><code>GITHUB_WEBHOOK_SECRET</code></td><td>Default signature secret for GitHub forwarding and replay.</td></tr><tr><td><code>GITHUB_APP_ID</code>, <code>GITHUB_APP_PRIVATE_KEY</code>, <code>GITHUB_APP_INSTALLATION_ID</code></td><td>GitHub App credentials for outbound API calls.</td></tr><tr><td><code>GITHUB_TOKEN</code>, <code>GH_TOKEN</code></td><td>Token credentials for outbound GitHub calls. Unset both for <code>github forward</code>.</td></tr><tr><td><code>GITLAB_TOKEN</code></td><td>Token for GitLab API reads and direct channel calls.</td></tr><tr><td><code>GITLAB_API_BASE_URL</code></td><td>Override the GitLab REST base URL for self-managed hosts.</td></tr><tr><td><code>GITLAB_WEBHOOK_SECRET</code></td><td>Default GitLab webhook token for replay and channel verification.</td></tr><tr><td><code>BITBUCKET_TOKEN</code></td><td>Token for Bitbucket API reads and direct channel calls.</td></tr><tr><td><code>BITBUCKET_API_BASE_URL</code></td><td>Override the Bitbucket Data Center REST base URL.</td></tr><tr><td><code>BITBUCKET_WEBHOOK_SECRET</code></td><td>Default Bitbucket signing secret for replay and channel verification.</td></tr><tr><td><code>SLACK_BOT_TOKEN</code>, <code>SLACK_APP_TOKEN</code></td><td>Slack tokens for one agent. Multi-agent servers use <code>&lt;PREFIX&gt;_SLACK_BOT_TOKEN</code> and <code>&lt;PREFIX&gt;_SLACK_APP_TOKEN</code>.</td></tr></tbody></table><h2 id="exit-status" tabindex="-1">Exit status <a class="header-anchor" href="#exit-status" aria-label="Permalink to &quot;Exit status&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Command</th><th>Nonzero contract</th></tr></thead><tbody><tr><td>No command</td><td>Print help and exit <code>1</code>. Explicit <code>help</code>, <code>--help</code>, and <code>-h</code> exit <code>0</code>.</td></tr><tr><td><code>run</code></td><td>For local and running-server trajectories, exit <code>1</code> when the trajectory fails.</td></tr><tr><td><code>call</code></td><td>Exit <code>1</code> unless the response succeeds with <code>ok: true</code>.</td></tr><tr><td><code>skill</code></td><td>Exit <code>2</code> when the name is missing and <code>1</code> when the request fails.</td></tr><tr><td><code>trajectory</code></td><td>Exit <code>1</code> when the reconstructed trajectory failed.</td></tr><tr><td><code>eval</code></td><td>Exit <code>1</code> for failed cases, or scored cases below threshold with <code>--strict</code>; exit <code>2</code> for invalid eval options or an execution with no matching cases. An empty <code>--list</code> succeeds.</td></tr><tr><td><code>eval status</code></td><td>Exit <code>3</code> while the batch runs, <code>1</code> when it failed or was cancelled, and <code>2</code> for invalid usage.</td></tr><tr><td><code>chat</code>, <code>session</code></td><td>Exit <code>2</code> for documented option conflicts or missing required input.</td></tr><tr><td><code>validate</code></td><td>Exit <code>1</code> when any project diagnostic has error severity.</td></tr><tr><td><code>convert-automation</code></td><td>Exit <code>1</code> for invalid input, authentication, export, or file-write failure. Warnings and dependency-install failure don&#39;t change a successful conversion exit.</td></tr><tr><td><code>migrate</code></td><td>Exit <code>0</code> after starting with <code>--no-wait</code> or after the agent opens a pull request. Exit <code>1</code> for invalid input, authentication or agent failure, or a completed run without a pull request.</td></tr><tr><td>Other commands</td><td>Exit nonzero when validation, authentication, a request, or the requested operation fails.</td></tr></tbody></table><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./project-layout.html">Project layout</a></li><li><a href="./sessions.html">Sessions, events, and streaming</a></li><li><a href="./evals.html">Evals</a></li><li><a href="./http-api.html">HTTP API</a></li><li><a href="./../deployment.html">Deployment</a></li><li><a href="./../guides/migrate.html">Early-alpha migration</a></li></ul>`,223)])])}const g=t(d,[["render",n]]);export{u as __pageData,g as default};
@@ -1 +1 @@
1
- import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),d={name:"reference/cli.md"};function n(r,e,c,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s("",204)])])}const g=t(d,[["render",n]]);export{u as __pageData,g as default};
1
+ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),d={name:"reference/cli.md"};function n(c,e,r,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s("",223)])])}const g=t(d,[["render",n]]);export{u as __pageData,g as default};
@@ -1,4 +1,4 @@
1
- import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse(`{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),n={name:"reference/connections.md"};function l(h,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="mcp-connections" tabindex="-1">MCP connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP connections&quot;">​</a></h1><p>An MCP connection gives the agent tools from an MCP server. Define one file per server under <code>bot/mcp-connections/</code>; the filename becomes the server name. Default-export <code>defineConnection</code> from <code>@cursor/bdk/connections</code>. The transport is remote HTTP, local stdio, the signed-in Cursor account&#39;s connectors, or a peer agent on the same host.</p><p>Put a server in <code>bot/host-connections/</code> when only host tools should call it. Host connections use the same <code>defineConnection</code> shape and support <code>bdk mcp oauth</code>; the model and playground don&#39;t see them.</p><h2 id="remote-mcp-server" tabindex="-1">Remote MCP server <a class="header-anchor" href="#remote-mcp-server" aria-label="Permalink to &quot;Remote MCP server&quot;">​</a></h2><p>Point an MCP connection at a remote server with a URL.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineConnection } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/bdk/connections&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
1
+ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse(`{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),n={name:"reference/connections.md"};function h(l,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="mcp-connections" tabindex="-1">MCP connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP connections&quot;">​</a></h1><p>An MCP connection gives the agent tools from an MCP server. Define one file per server under <code>bot/mcp-connections/</code>; the filename becomes the server name. Default-export <code>defineConnection</code> from <code>@cursor/bdk/connections</code>. The transport is remote HTTP, local stdio, the signed-in Cursor account&#39;s connectors, or a peer agent on the same host.</p><p>Put a server in <code>bot/host-connections/</code> when only host tools should call it. Host connections use the same <code>defineConnection</code> shape and support <code>bdk mcp oauth</code>; the model and playground don&#39;t see them.</p><h2 id="remote-mcp-server" tabindex="-1">Remote MCP server <a class="header-anchor" href="#remote-mcp-server" aria-label="Permalink to &quot;Remote MCP server&quot;">​</a></h2><p>Point an MCP connection at a remote server with a URL.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineConnection } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/bdk/connections&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
2
2
  <span class="line"></span>
3
3
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
4
4
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://mcp.linear.app/mcp&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@@ -7,11 +7,10 @@ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c
7
7
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> command: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;slack-mcp-server&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
8
8
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> args: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;--transport&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;stdio&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
9
9
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> env: { SLACK_MCP_XOXB_TOKEN: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;\${SLACK_BOT_TOKEN}&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
10
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>That timing is the point of the template. Your connection file is imported once, when the project loads, and a hosted deployment has none of its secrets in the environment yet, because the platform passes them to the agent per request. So a <code>process.env.SLACK_BOT_TOKEN</code> read at the top of the file captures an empty string and keeps sending it for the life of the process, while the same file works locally because <code>.env.local</code> was read before the import. The template form is right in both places.</p><p><code>bdk validate</code> warns about a template the environment does not define and names the variable. It stays a warning rather than an error, since a hosted deployment resolves it later. An unset variable resolves to an empty value at connect time, which the server reports as an auth failure.</p><h2 id="host-mcp-oauth" tabindex="-1">Host MCP OAuth <a class="header-anchor" href="#host-mcp-oauth" aria-label="Permalink to &quot;Host MCP OAuth&quot;">​</a></h2><p>For servers that speak OAuth, set <code>oauth: true</code> and authorize with the CLI or mid-run Connect. Tokens live in <code>mcp-auth.json</code> under the CLI config directory. <code>--store</code> copies them onto the deployment as <code>MCP_OAUTH_&lt;NAME&gt;_*</code> secrets.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
10
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>That timing is the point of the template. Your connection file is imported once, when the project loads, and a hosted deployment has none of its secrets in the environment yet, because the platform passes them to the agent per request. So a <code>process.env.SLACK_BOT_TOKEN</code> read at the top of the file captures an empty string and keeps sending it for the life of the process, while the same file works locally because <code>.env.local</code> was read before the import. The template form is right in both places.</p><p><code>bdk validate</code> warns about a template the environment does not define and names the variable. It stays a warning rather than an error, since a hosted deployment resolves it later. An unset variable resolves to an empty value at connect time, which the server reports as an auth failure.</p><h2 id="host-mcp-oauth" tabindex="-1">Host MCP OAuth <a class="header-anchor" href="#host-mcp-oauth" aria-label="Permalink to &quot;Host MCP OAuth&quot;">​</a></h2><p>For servers that speak OAuth, set <code>oauth: true</code> and authorize with the CLI or mid-run Connect. Tokens live in <code>mcp-auth.json</code> under the CLI config directory of the machine that authorized them. A hosted agent reaches OAuth servers through a <a href="#cursor-account-mcp-connection">Cursor account connection</a> instead.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
11
11
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://mcp.example.com/inventory&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
12
12
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> oauth: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
13
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk mcp oauth inventory # browser PKCE → local mcp-auth.json</span></span>
14
- <span class="line"><span>bdk mcp oauth inventory --store # also upsert deployment secrets</span></span></code></pre></div><p>Full walkthrough: <a href="./../guides/mcp-oauth.html">Host MCP OAuth</a>. Companion skill: <a href="./../../skills/mcp-auth/SKILL.html"><code>skills/mcp-auth/SKILL.md</code></a>.</p><h2 id="per-session-auth" tabindex="-1">Per-session auth <a class="header-anchor" href="#per-session-auth" aria-label="Permalink to &quot;Per-session auth&quot;">​</a></h2><p>For http/sse connections whose credential depends on who the session is for, declare an <code>auth</code> callback instead of static headers. It runs host-side with the session&#39;s <code>SessionInfo</code> and returns headers merged over the static ones:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
13
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk mcp oauth inventory # browser PKCE → local mcp-auth.json</span></span></code></pre></div><p>Full walkthrough: <a href="./../guides/mcp-oauth.html">Host MCP OAuth</a>. Companion skill: <a href="./../../skills/mcp-auth/SKILL.html"><code>skills/mcp-auth/SKILL.md</code></a>.</p><h2 id="per-session-auth" tabindex="-1">Per-session auth <a class="header-anchor" href="#per-session-auth" aria-label="Permalink to &quot;Per-session auth&quot;">​</a></h2><p>For http/sse connections whose credential depends on who the session is for, declare an <code>auth</code> callback instead of static headers. It runs host-side with the session&#39;s <code>SessionInfo</code> and returns headers merged over the static ones:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
15
14
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://api.cursor.com/v1/mcp/plugins&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
16
15
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> auth</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">session</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ({</span></span>
17
16
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> headers: { Authorization: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`Bearer \${</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">await</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> grantFor</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">(</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">session</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
@@ -64,4 +63,4 @@ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c
64
63
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> execute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">query</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">ctx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
65
64
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ctx.host.mcp.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">callTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;linear&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;list_issues&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, { query });</span></span>
66
65
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
67
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>host.mcp.names()</code> lists connection names. <code>listTools(name)</code> / <code>callTool(name, tool, args)</code> call into a named connection.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./../guides/mcp-oauth.html">Host MCP OAuth</a>: <code>mcp oauth</code>, Connect, <code>--store</code></li><li><a href="./tools.html">Tools</a>: authored tools that wrap MCP connections</li><li><a href="./../guides/webhooks.html">Webhooks</a>: calling MCP connections from handlers</li><li><a href="./../guides/agent-to-agent.html">Peer agents</a>: when a specialist is its own agent</li></ul>`,58)])])}const E=i(n,[["render",l]]);export{c as __pageData,E as default};
66
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>host.mcp.names()</code> lists connection names. <code>listTools(name)</code> / <code>callTool(name, tool, args)</code> call into a named connection.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./../guides/mcp-oauth.html">Host MCP OAuth</a>: <code>mcp oauth</code>, Connect, and hosted agents</li><li><a href="./tools.html">Tools</a>: authored tools that wrap MCP connections</li><li><a href="./../guides/webhooks.html">Webhooks</a>: calling MCP connections from handlers</li><li><a href="./../guides/agent-to-agent.html">Peer agents</a>: when a specialist is its own agent</li></ul>`,58)])])}const E=i(n,[["render",h]]);export{c as __pageData,E as default};