@cursor/bdk 0.2.4 → 0.2.6

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 (348) hide show
  1. package/README.md +76 -1154
  2. package/dist/bin/agent-serve.js +17 -11
  3. package/dist/channels/github/github-channel.d.ts +4 -4
  4. package/dist/channels/github/github-channel.js +5 -5
  5. package/dist/channels/slack/eval-directive.js +1 -1
  6. package/dist/docs/404.html +2 -2
  7. package/dist/docs/assets/{app.4kQ8Db_q.js → app.CJLKDVza.js} +4 -4
  8. package/dist/docs/assets/{building-with-agents.md.-fcjCmJU.js → building-with-agents.md.BPjPFxFg.js} +2 -2
  9. package/dist/docs/assets/{building-with-agents.md.-fcjCmJU.lean.js → building-with-agents.md.BPjPFxFg.lean.js} +1 -1
  10. package/dist/docs/assets/chunks/@localSearchIndexroot.Bq-pxRXm.js +1 -0
  11. package/dist/docs/assets/chunks/{VPLocalSearchBox.DY1RwB8Q.js → VPLocalSearchBox.BW9mrQmq.js} +1 -1
  12. package/dist/docs/assets/chunks/{arc.CxE_fSPK.js → arc.D8ZOvM1m.js} +1 -1
  13. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CPX426ui.js → architectureDiagram-Q4EWVU46.CXEKhLW-.js} +1 -1
  14. package/dist/docs/assets/chunks/{baseUniq.CB52JrKG.js → baseUniq.BJkVKblr.js} +1 -1
  15. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.J0cNaQCL.js → blockDiagram-DXYQGD6D.DQDbHxor.js} +1 -1
  16. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.DJn3vEGT.js → c4Diagram-AHTNJAMY.ByMD6LYM.js} +1 -1
  17. package/dist/docs/assets/chunks/channel.DCU8W1RP.js +1 -0
  18. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.Dao618F6.js → chunk-4BX2VUAB.Dtq1aVI9.js} +1 -1
  19. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.QW8Rhjai.js → chunk-4TB4RGXK.BL_XrkoQ.js} +1 -1
  20. package/dist/docs/assets/chunks/{chunk-55IACEB6.DfRLLKF_.js → chunk-55IACEB6.BDPXu94_.js} +1 -1
  21. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.CIV2ApKQ.js → chunk-EDXVE4YY.DhGOQj4k.js} +1 -1
  22. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.BEheSuxp.js → chunk-FMBD7UC4.DSF5nr8v.js} +1 -1
  23. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CUN88ENB.js → chunk-OYMX7WX6.Day7wayw.js} +1 -1
  24. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.CgqCs8b_.js → chunk-QZHKN3VN.CpBEC0zA.js} +1 -1
  25. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.iCH0nnTJ.js → chunk-YZCP3GAM.X_7rY1rx.js} +1 -1
  26. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DwpXsM06.js +1 -0
  27. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DwpXsM06.js +1 -0
  28. package/dist/docs/assets/chunks/clone.DH6Mx2zB.js +1 -0
  29. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BLcUxhWE.js → cose-bilkent-S5V4N54A.BVRmi2ko.js} +1 -1
  30. package/dist/docs/assets/chunks/{dagre-KV5264BT.Ep7LofOm.js → dagre-KV5264BT.Dei9oslB.js} +1 -1
  31. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.Bzf4GSQ4.js → diagram-5BDNPKRD._M-efGt7.js} +1 -1
  32. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.DD6Jh-eM.js → diagram-G4DWMVQ6.D1Vmhfsj.js} +1 -1
  33. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.oOIl8bWd.js → diagram-MMDJMWI5.cE1bmvAC.js} +1 -1
  34. package/dist/docs/assets/chunks/{diagram-TYMM5635.DHs85Ade.js → diagram-TYMM5635.DkXAfznP.js} +1 -1
  35. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.BIb5ghCk.js → erDiagram-SMLLAGMA.DH_pSwPg.js} +1 -1
  36. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.DV4paY9k.js → flowDiagram-DWJPFMVM.kAWVN9j1.js} +1 -1
  37. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.AyEKA6_v.js → ganttDiagram-T4ZO3ILL.8r0w49-p.js} +1 -1
  38. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.BltiCDFo.js → gitGraphDiagram-UUTBAWPF.BDa7Bi1i.js} +1 -1
  39. package/dist/docs/assets/chunks/{graph.DzuEYGdC.js → graph.BMPXHz_B.js} +1 -1
  40. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.BV2l981J.js → infoDiagram-42DDH7IO.BmlcqewS.js} +1 -1
  41. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.BA4Izf-m.js → ishikawaDiagram-UXIWVN3A.CVSEQSul.js} +1 -1
  42. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.DjaFbFS3.js → journeyDiagram-VCZTEJTY.BpeWJ5n-.js} +1 -1
  43. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CfTFieDs.js → kanban-definition-6JOO6SKY.DHbDXuxB.js} +1 -1
  44. package/dist/docs/assets/chunks/{layout.DzfWqTBV.js → layout.CzrCDgkP.js} +1 -1
  45. package/dist/docs/assets/chunks/{linear.BO6mpulV.js → linear.HwBsflwN.js} +1 -1
  46. package/dist/docs/assets/chunks/{min.BGgTadgT.js → min.DqGHolT3.js} +1 -1
  47. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.DPuIXVWY.js → mindmap-definition-QFDTVHPH.ZYGlOawh.js} +1 -1
  48. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.BOnl3bBg.js → pieDiagram-DEJITSTG.C2KRXlNR.js} +1 -1
  49. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DNB6Ckdc.js → quadrantDiagram-34T5L4WZ.CHj3Qefp.js} +1 -1
  50. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.D5-Qo7vb.js → requirementDiagram-MS252O5E.B1L4Tf7k.js} +1 -1
  51. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.8t65cesf.js → sankeyDiagram-XADWPNL6.dNR2yi1B.js} +1 -1
  52. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.CaG07BdS.js → sequenceDiagram-FGHM5R23.BrvQ3C6m.js} +1 -1
  53. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.TKOweTB6.js → stateDiagram-FHFEXIEX.BtehEykA.js} +1 -1
  54. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.kzD0-U89.js +1 -0
  55. package/dist/docs/assets/chunks/{theme.Dx-JhpTB.js → theme.BDHBZUkP.js} +2 -2
  56. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.fE53zQ2s.js → timeline-definition-GMOUNBTQ.Bn7nhqEN.js} +1 -1
  57. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DJsZZaJg.js → vennDiagram-DHZGUBPP.DKhc38sz.js} +1 -1
  58. package/dist/docs/assets/chunks/wardley-RL74JXVD.DOXQ0w8J.js +162 -0
  59. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.CMZ-Ru_t.js → wardleyDiagram-NUSXRM2D.Bbq5B2Ic.js} +1 -1
  60. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.XXrhBc7a.js → xychartDiagram-5P7HB3ND.B77HE1K8.js} +1 -1
  61. package/dist/docs/assets/{deployment.md.UhnJIMr-.js → deployment.md.BdqTiGdc.js} +4 -4
  62. package/dist/docs/assets/{deployment.md.UhnJIMr-.lean.js → deployment.md.BdqTiGdc.lean.js} +1 -1
  63. package/dist/docs/assets/{evals.md.CCAtNcuL.js → evals.md.C851kViu.js} +3 -3
  64. package/dist/docs/assets/{evals.md.CCAtNcuL.lean.js → evals.md.C851kViu.lean.js} +1 -1
  65. package/dist/docs/assets/{guides_agent-to-agent.md.CGkicXeB.js → guides_agent-to-agent.md.Cps5NiCV.js} +2 -2
  66. package/dist/docs/assets/{guides_agent-to-agent.md.CGkicXeB.lean.js → guides_agent-to-agent.md.Cps5NiCV.lean.js} +1 -1
  67. package/dist/docs/assets/{guides_bitbucket.md.Cb3LPKt3.js → guides_bitbucket.md.BB6fqD-M.js} +2 -2
  68. package/dist/docs/assets/{guides_bitbucket.md.Cb3LPKt3.lean.js → guides_bitbucket.md.BB6fqD-M.lean.js} +1 -1
  69. package/dist/docs/assets/{guides_cloud-agents.md.BuEkDCwo.js → guides_cloud-agents.md.CWJjS9No.js} +2 -2
  70. package/dist/docs/assets/{guides_cloud-agents.md.BuEkDCwo.lean.js → guides_cloud-agents.md.CWJjS9No.lean.js} +1 -1
  71. package/dist/docs/assets/{guides_convert-automation.md.Ci-Y2iD5.js → guides_convert-automation.md.DMEX9nF-.js} +3 -3
  72. package/dist/docs/assets/{guides_convert-automation.md.Ci-Y2iD5.lean.js → guides_convert-automation.md.DMEX9nF-.lean.js} +1 -1
  73. package/dist/docs/assets/{guides_github.md.Bq9kQU9B.js → guides_github.md.Cr1Xlf-m.js} +3 -3
  74. package/dist/docs/assets/{guides_github.md.Bq9kQU9B.lean.js → guides_github.md.Cr1Xlf-m.lean.js} +1 -1
  75. package/dist/docs/assets/{guides_gitlab.md.BM27P43u.js → guides_gitlab.md.CMpmFi4M.js} +2 -2
  76. package/dist/docs/assets/{guides_gitlab.md.BM27P43u.lean.js → guides_gitlab.md.CMpmFi4M.lean.js} +1 -1
  77. package/dist/docs/assets/{guides_grokbot-agents.md.yxVbSlKA.js → guides_grokbot-agents.md.tD1smFhU.js} +2 -2
  78. package/dist/docs/assets/{guides_grokbot-agents.md.yxVbSlKA.lean.js → guides_grokbot-agents.md.tD1smFhU.lean.js} +1 -1
  79. package/dist/docs/assets/{guides_hooks.md.BWoiNaMq.js → guides_hooks.md.5Ce3NXxZ.js} +2 -2
  80. package/dist/docs/assets/{guides_hooks.md.BWoiNaMq.lean.js → guides_hooks.md.5Ce3NXxZ.lean.js} +1 -1
  81. package/dist/docs/assets/{guides_improve.md.COtL-6ft.js → guides_improve.md.CRrYq22s.js} +2 -2
  82. package/dist/docs/assets/{guides_improve.md.COtL-6ft.lean.js → guides_improve.md.CRrYq22s.lean.js} +1 -1
  83. package/dist/docs/assets/{guides_jev.md.CRcgmjDb.js → guides_jev.md.D7XH4JH3.js} +2 -2
  84. package/dist/docs/assets/{guides_jev.md.CRcgmjDb.lean.js → guides_jev.md.D7XH4JH3.lean.js} +1 -1
  85. package/dist/docs/assets/{guides_mcp-oauth.md.Cu6mhZ_3.js → guides_mcp-oauth.md.DR3zhC9r.js} +2 -2
  86. package/dist/docs/assets/{guides_mcp-oauth.md.Cu6mhZ_3.lean.js → guides_mcp-oauth.md.DR3zhC9r.lean.js} +1 -1
  87. package/dist/docs/assets/{guides_opentelemetry.md.DLlIB5rv.js → guides_opentelemetry.md.jcPNrQbH.js} +8 -6
  88. package/dist/docs/assets/{guides_opentelemetry.md.DLlIB5rv.lean.js → guides_opentelemetry.md.jcPNrQbH.lean.js} +1 -1
  89. package/dist/docs/assets/{guides_slack.md.diqqXTTm.js → guides_slack.md.Bn-WupSE.js} +8 -8
  90. package/dist/docs/assets/{guides_slack.md.diqqXTTm.lean.js → guides_slack.md.Bn-WupSE.lean.js} +1 -1
  91. package/dist/docs/assets/{guides_webhooks.md.D0furjw0.js → guides_webhooks.md.BBvAm_VF.js} +2 -2
  92. package/dist/docs/assets/{guides_webhooks.md.D0furjw0.lean.js → guides_webhooks.md.BBvAm_VF.lean.js} +1 -1
  93. package/dist/docs/assets/{hillclimbing.md.Biy0m-Qb.js → hillclimbing.md.Dxvd-0gT.js} +2 -2
  94. package/dist/docs/assets/{hillclimbing.md.Biy0m-Qb.lean.js → hillclimbing.md.Dxvd-0gT.lean.js} +1 -1
  95. package/dist/docs/assets/index.md.Dxxr7pFa.js +27 -0
  96. package/dist/docs/assets/{index.md.CVc_oOA3.lean.js → index.md.Dxxr7pFa.lean.js} +1 -1
  97. package/dist/docs/assets/{quickstart.md.CHpHPBUN.js → quickstart.md.BK5gjHM2.js} +2 -2
  98. package/dist/docs/assets/{quickstart.md.CHpHPBUN.lean.js → quickstart.md.BK5gjHM2.lean.js} +1 -1
  99. package/dist/docs/assets/{reference_agent-config.md.Cj5uBKp4.js → reference_agent-config.md.DrtLxWgR.js} +4 -4
  100. package/dist/docs/assets/{reference_agent-config.md.Cj5uBKp4.lean.js → reference_agent-config.md.DrtLxWgR.lean.js} +1 -1
  101. package/dist/docs/assets/{reference_artifacts.md.CQfKq8F2.js → reference_artifacts.md.DLV9MZES.js} +2 -2
  102. package/dist/docs/assets/{reference_artifacts.md.CQfKq8F2.lean.js → reference_artifacts.md.DLV9MZES.lean.js} +1 -1
  103. package/dist/docs/assets/{reference_channels.md.mbNtKCiR.js → reference_channels.md.LbNIJBwd.js} +2 -2
  104. package/dist/docs/assets/{reference_channels.md.mbNtKCiR.lean.js → reference_channels.md.LbNIJBwd.lean.js} +1 -1
  105. package/dist/docs/assets/{reference_cli.md.DgeLTO18.js → reference_cli.md.BsgDqYPh.js} +4 -4
  106. package/dist/docs/assets/{reference_cli.md.DgeLTO18.lean.js → reference_cli.md.BsgDqYPh.lean.js} +1 -1
  107. package/dist/docs/assets/{reference_connections.md.COq--gAm.js → reference_connections.md.Bljpve-y.js} +4 -4
  108. package/dist/docs/assets/{reference_connections.md.COq--gAm.lean.js → reference_connections.md.Bljpve-y.lean.js} +1 -1
  109. package/dist/docs/assets/{reference_evals.md.CJm3uCUm.js → reference_evals.md.D5i8PuXJ.js} +2 -2
  110. package/dist/docs/assets/{reference_evals.md.CJm3uCUm.lean.js → reference_evals.md.D5i8PuXJ.lean.js} +1 -1
  111. package/dist/docs/assets/{reference_extensions.md.pa2tN-e4.js → reference_extensions.md.OUacPetl.js} +3 -3
  112. package/dist/docs/assets/{reference_extensions.md.pa2tN-e4.lean.js → reference_extensions.md.OUacPetl.lean.js} +1 -1
  113. package/dist/docs/assets/{reference_hooks.md.DbthhtIR.js → reference_hooks.md.C5LCJ1R3.js} +2 -2
  114. package/dist/docs/assets/{reference_hooks.md.DbthhtIR.lean.js → reference_hooks.md.C5LCJ1R3.lean.js} +1 -1
  115. package/dist/docs/assets/{reference_http-api.md.BZOvhCqY.js → reference_http-api.md.DbFNOubV.js} +1 -1
  116. package/dist/docs/assets/{reference_instructions.md.Bdwscs4G.js → reference_instructions.md.DrcHZXig.js} +2 -2
  117. package/dist/docs/assets/{reference_instructions.md.Bdwscs4G.lean.js → reference_instructions.md.DrcHZXig.lean.js} +1 -1
  118. package/dist/docs/assets/reference_playground.md.1hx0gcIu.js +1 -0
  119. package/dist/docs/assets/{reference_playground.md.BdQzRJc2.lean.js → reference_playground.md.1hx0gcIu.lean.js} +1 -1
  120. package/dist/docs/assets/{reference_project-layout.md.CpLQ9j4K.js → reference_project-layout.md.C2JMRh7p.js} +2 -2
  121. package/dist/docs/assets/{reference_prompt.md.BQZB4eaV.js → reference_prompt.md.DqPh71XN.js} +3 -3
  122. package/dist/docs/assets/{reference_prompt.md.BQZB4eaV.lean.js → reference_prompt.md.DqPh71XN.lean.js} +1 -1
  123. package/dist/docs/assets/{reference_schedules.md.BVU5EFbz.js → reference_schedules.md.BuJ8fgMa.js} +2 -2
  124. package/dist/docs/assets/{reference_schedules.md.BVU5EFbz.lean.js → reference_schedules.md.BuJ8fgMa.lean.js} +1 -1
  125. package/dist/docs/assets/reference_sessions.md.CM5zo3w4.js +1 -0
  126. package/dist/docs/assets/{reference_sessions.md.DeRUItHD.lean.js → reference_sessions.md.CM5zo3w4.lean.js} +1 -1
  127. package/dist/docs/assets/{reference_skills.md.Cy00QMKS.js → reference_skills.md.ClkMoQsV.js} +2 -2
  128. package/dist/docs/assets/{reference_skills.md.Cy00QMKS.lean.js → reference_skills.md.ClkMoQsV.lean.js} +1 -1
  129. package/dist/docs/assets/{reference_subagents.md.B8oyeXOI.js → reference_subagents.md.gmPt5J-M.js} +2 -2
  130. package/dist/docs/assets/{reference_subagents.md.B8oyeXOI.lean.js → reference_subagents.md.gmPt5J-M.lean.js} +1 -1
  131. package/dist/docs/assets/{reference_tools.md.hg2Wi5Bq.js → reference_tools.md.v3SXVSs_.js} +2 -2
  132. package/dist/docs/assets/{reference_tools.md.hg2Wi5Bq.lean.js → reference_tools.md.v3SXVSs_.lean.js} +1 -1
  133. package/dist/docs/assets/{templates_agentic-owners.md.BykUiZ8j.js → templates_agentic-owners.md.CvmABtia.js} +2 -2
  134. package/dist/docs/assets/templates_grokbot-agents.md.2sydjFiO.js +5 -0
  135. package/dist/docs/assets/templates_grokbot-agents.md.2sydjFiO.lean.js +1 -0
  136. package/dist/docs/assets/{templates_security-reviewer.md.DXMmKl_o.js → templates_security-reviewer.md.Gh6EF9Us.js} +3 -2
  137. package/dist/docs/assets/{templates_security-reviewer.md.DXMmKl_o.lean.js → templates_security-reviewer.md.Gh6EF9Us.lean.js} +1 -1
  138. package/dist/docs/assets/{templates_thermo-quality-review.md.Dg1p1MsG.js → templates_thermo-quality-review.md.B77UyTrX.js} +2 -2
  139. package/dist/docs/assets/{templates_thermo-quality-review.md.Dg1p1MsG.lean.js → templates_thermo-quality-review.md.B77UyTrX.lean.js} +1 -1
  140. package/dist/docs/assets/{templates_thermo-review.md.Dlylkowj.js → templates_thermo-review.md.DRJ7mC5U.js} +2 -2
  141. package/dist/docs/assets/{templates_thermo-review.md.Dlylkowj.lean.js → templates_thermo-review.md.DRJ7mC5U.lean.js} +1 -1
  142. package/dist/docs/assets/templates_triage.md.CNN6b0JZ.js +9 -0
  143. package/dist/docs/assets/{templates_triage.md.CvJyx81N.lean.js → templates_triage.md.CNN6b0JZ.lean.js} +1 -1
  144. package/dist/docs/assets/troubleshooting.md.Bscj6ODe.js +1 -0
  145. package/dist/docs/assets/{troubleshooting.md.Cw5PKa3t.lean.js → troubleshooting.md.Bscj6ODe.lean.js} +1 -1
  146. package/dist/docs/building-with-agents.html +36 -36
  147. package/dist/docs/building-with-agents.md +0 -3
  148. package/dist/docs/deployment.html +38 -38
  149. package/dist/docs/deployment.md +2 -9
  150. package/dist/docs/evals.html +37 -37
  151. package/dist/docs/evals.md +2 -5
  152. package/dist/docs/guides/agent-to-agent.html +36 -36
  153. package/dist/docs/guides/agent-to-agent.md +0 -3
  154. package/dist/docs/guides/bitbucket.html +36 -36
  155. package/dist/docs/guides/bitbucket.md +0 -3
  156. package/dist/docs/guides/cloud-agents.html +36 -36
  157. package/dist/docs/guides/cloud-agents.md +0 -4
  158. package/dist/docs/guides/convert-automation.html +37 -37
  159. package/dist/docs/guides/convert-automation.md +2 -5
  160. package/dist/docs/guides/github.html +37 -37
  161. package/dist/docs/guides/github.md +1 -4
  162. package/dist/docs/guides/gitlab.html +36 -36
  163. package/dist/docs/guides/gitlab.md +0 -3
  164. package/dist/docs/guides/grokbot-agents.html +37 -37
  165. package/dist/docs/guides/grokbot-agents.md +1 -4
  166. package/dist/docs/guides/hooks.html +36 -36
  167. package/dist/docs/guides/hooks.md +0 -3
  168. package/dist/docs/guides/improve.html +36 -36
  169. package/dist/docs/guides/improve.md +0 -3
  170. package/dist/docs/guides/jev.html +36 -36
  171. package/dist/docs/guides/jev.md +0 -3
  172. package/dist/docs/guides/mcp-oauth.html +37 -37
  173. package/dist/docs/guides/mcp-oauth.md +1 -4
  174. package/dist/docs/guides/opentelemetry.html +42 -40
  175. package/dist/docs/guides/opentelemetry.md +4 -5
  176. package/dist/docs/guides/slack.html +43 -43
  177. package/dist/docs/guides/slack.md +14 -24
  178. package/dist/docs/guides/webhooks.html +36 -36
  179. package/dist/docs/guides/webhooks.md +0 -3
  180. package/dist/docs/hashmap.json +1 -1
  181. package/dist/docs/hillclimbing.html +36 -36
  182. package/dist/docs/hillclimbing.md +0 -3
  183. package/dist/docs/index.html +38 -38
  184. package/dist/docs/index.md +9 -16
  185. package/dist/docs/llms-full.txt +153 -234
  186. package/dist/docs/llms.txt +1 -0
  187. package/dist/docs/quickstart.html +36 -36
  188. package/dist/docs/quickstart.md +2 -7
  189. package/dist/docs/reference/agent-config.html +38 -38
  190. package/dist/docs/reference/agent-config.md +4 -7
  191. package/dist/docs/reference/artifacts.html +36 -36
  192. package/dist/docs/reference/artifacts.md +0 -3
  193. package/dist/docs/reference/channels.html +37 -37
  194. package/dist/docs/reference/channels.md +1 -6
  195. package/dist/docs/reference/cli.html +38 -38
  196. package/dist/docs/reference/cli.md +7 -14
  197. package/dist/docs/reference/connections.html +38 -38
  198. package/dist/docs/reference/connections.md +7 -10
  199. package/dist/docs/reference/evals.html +36 -36
  200. package/dist/docs/reference/evals.md +0 -3
  201. package/dist/docs/reference/extensions.html +37 -37
  202. package/dist/docs/reference/extensions.md +2 -5
  203. package/dist/docs/reference/hooks.html +36 -36
  204. package/dist/docs/reference/hooks.md +0 -3
  205. package/dist/docs/reference/http-api.html +37 -37
  206. package/dist/docs/reference/http-api.md +1 -1
  207. package/dist/docs/reference/instructions.html +36 -36
  208. package/dist/docs/reference/instructions.md +0 -3
  209. package/dist/docs/reference/playground.html +36 -36
  210. package/dist/docs/reference/playground.md +0 -3
  211. package/dist/docs/reference/project-layout.html +37 -37
  212. package/dist/docs/reference/project-layout.md +2 -2
  213. package/dist/docs/reference/prompt.html +37 -37
  214. package/dist/docs/reference/prompt.md +0 -3
  215. package/dist/docs/reference/schedules.html +36 -36
  216. package/dist/docs/reference/schedules.md +0 -3
  217. package/dist/docs/reference/sessions.html +36 -36
  218. package/dist/docs/reference/sessions.md +0 -3
  219. package/dist/docs/reference/skills.html +36 -36
  220. package/dist/docs/reference/skills.md +0 -3
  221. package/dist/docs/reference/subagents.html +36 -36
  222. package/dist/docs/reference/subagents.md +0 -3
  223. package/dist/docs/reference/tools.html +36 -36
  224. package/dist/docs/reference/tools.md +1 -5
  225. package/dist/docs/templates/agentic-owners.html +37 -37
  226. package/dist/docs/templates/agentic-owners.md +2 -3
  227. package/dist/docs/templates/grokbot-agents.html +64 -0
  228. package/dist/docs/templates/grokbot-agents.md +55 -0
  229. package/dist/docs/templates/security-reviewer.html +38 -37
  230. package/dist/docs/templates/security-reviewer.md +7 -11
  231. package/dist/docs/templates/thermo-quality-review.html +37 -37
  232. package/dist/docs/templates/thermo-quality-review.md +5 -8
  233. package/dist/docs/templates/thermo-review.html +37 -37
  234. package/dist/docs/templates/thermo-review.md +5 -7
  235. package/dist/docs/templates/triage.html +39 -39
  236. package/dist/docs/templates/triage.md +8 -4
  237. package/dist/docs/troubleshooting.html +36 -36
  238. package/dist/docs/troubleshooting.md +3 -7
  239. package/dist/evals.d.ts +2 -2
  240. package/dist/internal/cli-ax.d.ts.map +1 -1
  241. package/dist/internal/cli-ax.js +14 -7
  242. package/dist/internal/eval-runner.js +7 -4
  243. package/dist/internal/init-interview.d.ts +0 -1
  244. package/dist/internal/init-interview.d.ts.map +1 -1
  245. package/dist/internal/init-interview.js +15 -24
  246. package/dist/internal/legacy-command-guard.d.ts +4 -1
  247. package/dist/internal/legacy-command-guard.d.ts.map +1 -1
  248. package/dist/internal/legacy-command-guard.js +11 -2
  249. package/dist/internal/platform-timers.d.ts +8 -1
  250. package/dist/internal/platform-timers.d.ts.map +1 -1
  251. package/dist/internal/platform-timers.js +10 -2
  252. package/dist/internal/reminder-control-plane-protocol.d.ts +8 -1
  253. package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
  254. package/dist/internal/reminder-runner.d.ts +5 -0
  255. package/dist/internal/reminder-runner.d.ts.map +1 -1
  256. package/dist/internal/reminder-runner.js +27 -1
  257. package/dist/internal/resolve-prod-target.d.ts +3 -0
  258. package/dist/internal/resolve-prod-target.d.ts.map +1 -1
  259. package/dist/internal/resolve-prod-target.js +2 -1
  260. package/dist/internal/run-client.d.ts +10 -1
  261. package/dist/internal/run-client.d.ts.map +1 -1
  262. package/dist/internal/run-client.js +152 -51
  263. package/dist/internal/server.d.ts +6 -0
  264. package/dist/internal/server.d.ts.map +1 -1
  265. package/dist/internal/server.js +20 -8
  266. package/dist/internal/session-links.d.ts.map +1 -1
  267. package/dist/internal/session-links.js +8 -7
  268. package/dist/internal/sessions-client.d.ts +1 -0
  269. package/dist/internal/sessions-client.d.ts.map +1 -1
  270. package/dist/internal/sessions-client.js +2 -0
  271. package/docs/README.md +9 -16
  272. package/docs/building-with-agents.md +0 -3
  273. package/docs/deployment.md +2 -9
  274. package/docs/evals.md +2 -5
  275. package/docs/guides/agent-to-agent.md +0 -3
  276. package/docs/guides/bitbucket.md +0 -3
  277. package/docs/guides/cloud-agents.md +0 -4
  278. package/docs/guides/convert-automation.md +2 -5
  279. package/docs/guides/github.md +1 -4
  280. package/docs/guides/gitlab.md +0 -3
  281. package/docs/guides/grokbot-agents.md +1 -4
  282. package/docs/guides/hooks.md +0 -3
  283. package/docs/guides/improve.md +0 -3
  284. package/docs/guides/jev.md +0 -3
  285. package/docs/guides/mcp-oauth.md +1 -4
  286. package/docs/guides/opentelemetry.md +4 -5
  287. package/docs/guides/slack.md +14 -24
  288. package/docs/guides/webhooks.md +0 -3
  289. package/docs/hillclimbing.md +0 -3
  290. package/docs/quickstart.md +2 -7
  291. package/docs/reference/agent-config.md +4 -7
  292. package/docs/reference/artifacts.md +0 -3
  293. package/docs/reference/channels.md +1 -6
  294. package/docs/reference/cli.md +7 -14
  295. package/docs/reference/connections.md +7 -10
  296. package/docs/reference/evals.md +0 -3
  297. package/docs/reference/extensions.md +2 -5
  298. package/docs/reference/hooks.md +0 -3
  299. package/docs/reference/http-api.md +1 -1
  300. package/docs/reference/instructions.md +0 -3
  301. package/docs/reference/playground.md +0 -3
  302. package/docs/reference/project-layout.md +2 -2
  303. package/docs/reference/prompt.md +0 -3
  304. package/docs/reference/schedules.md +0 -3
  305. package/docs/reference/sessions.md +0 -3
  306. package/docs/reference/skills.md +0 -3
  307. package/docs/reference/subagents.md +0 -3
  308. package/docs/reference/tools.md +1 -5
  309. package/docs/templates/agentic-owners.md +2 -3
  310. package/docs/templates/grokbot-agents.md +60 -0
  311. package/docs/templates/security-reviewer.md +7 -11
  312. package/docs/templates/thermo-quality-review.md +5 -8
  313. package/docs/templates/thermo-review.md +5 -7
  314. package/docs/templates/triage.md +8 -4
  315. package/docs/troubleshooting.md +3 -7
  316. package/package.json +2 -2
  317. package/templates/agentic-owners/README.md +0 -3
  318. package/templates/agents-md/README.md +4 -3
  319. package/templates/agents-md/evals/agents.eval.ts +1 -0
  320. package/templates/code-wiki/README.md +0 -3
  321. package/templates/code-wiki/bot/instructions.md +4 -4
  322. package/templates/demo/README.md +0 -3
  323. package/templates/grokbot-agents/README.md +4 -6
  324. package/templates/security-help/README.md +12 -6
  325. package/templates/security-reviewer/README.md +5 -6
  326. package/templates/security-reviewer/bot/tools/post_findings.ts +8 -8
  327. package/templates/thermo-quality-review/README.md +0 -3
  328. package/templates/thermo-quality-review/bot/tools/post_findings.ts +8 -8
  329. package/templates/thermo-review/README.md +0 -3
  330. package/templates/thermo-review/bot/tools/post_findings.ts +8 -8
  331. package/templates/triage/README.md +0 -3
  332. package/templates/triage/overlays/jira/README.md +0 -3
  333. package/templates/triage/overlays/linear/README.md +0 -3
  334. package/dist/docs/assets/chunks/@localSearchIndexroot.CvuAJ0My.js +0 -1
  335. package/dist/docs/assets/chunks/channel.BoNycAoN.js +0 -1
  336. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.C4x07Gkj.js +0 -1
  337. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.C4x07Gkj.js +0 -1
  338. package/dist/docs/assets/chunks/clone.Db22cH_-.js +0 -1
  339. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CuqmyQc4.js +0 -1
  340. package/dist/docs/assets/chunks/wardley-RL74JXVD.844kyrjl.js +0 -162
  341. package/dist/docs/assets/index.md.CVc_oOA3.js +0 -27
  342. package/dist/docs/assets/reference_playground.md.BdQzRJc2.js +0 -1
  343. package/dist/docs/assets/reference_sessions.md.DeRUItHD.js +0 -1
  344. package/dist/docs/assets/templates_triage.md.CvJyx81N.js +0 -9
  345. package/dist/docs/assets/troubleshooting.md.Cw5PKa3t.js +0 -1
  346. /package/dist/docs/assets/{reference_http-api.md.BZOvhCqY.lean.js → reference_http-api.md.DbFNOubV.lean.js} +0 -0
  347. /package/dist/docs/assets/{reference_project-layout.md.CpLQ9j4K.lean.js → reference_project-layout.md.C2JMRh7p.lean.js} +0 -0
  348. /package/dist/docs/assets/{templates_agentic-owners.md.BykUiZ8j.lean.js → templates_agentic-owners.md.CvmABtia.lean.js} +0 -0
@@ -1,4 +1,4 @@
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 d(o,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><p>The <code>@cursor/bdk</code> imports on this page are docs-ahead until publication; see <a href="/docs/#bdk-package-availability">BDK package availability</a>.</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, approval, tool, discovery, and health 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>
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, approval, tool, discovery, and health 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
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
3
  <span class="line"></span>
4
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>
@@ -20,4 +20,4 @@ import{_ as t,c as s,o as a,a3 as n}from"./chunks/framework.BNw1pucY.js";const k
20
20
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
21
21
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }),</span></span>
22
22
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
23
- <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-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, returning <code>400</code> on failure; an empty body is read as <code>{}</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>Track work after the response 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><tr><td><code>resolveApproval(...)</code></td><td>Approve or deny a parked tool call</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>Factory</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, streaming replies, and approvals. 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><tr><td><code>@cursor/bdk/channels/change-monitors</code></td><td><code>changeMonitorsChannel()</code></td><td>Change Monitor <code>checkpoint.created</code> events</td></tr><tr><td><code>@cursor/bdk/channels/issues</code></td><td><code>issuesChannel()</code></td><td>Factory <code>issue.created</code> events</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>`,39)])])}const u=t(i,[["render",d]]);export{k as __pageData,u as default};
23
+ <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-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, returning <code>400</code> on failure; an empty body is read as <code>{}</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>Track work after the response 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><tr><td><code>resolveApproval(...)</code></td><td>Approve or deny a parked tool call</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, streaming replies, and approvals. 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>`,38)])])}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 d(o,e,r,h,l,c){return a(),s("div",null,[...e[0]||(e[0]=[n("",39)])])}const u=t(i,[["render",d]]);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("",38)])])}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(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><blockquote><p><strong>Docs ahead:</strong> <code>@cursor/bdk</code> is not on npm yet. This command will work after publication.</p></blockquote><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 that will ship with <code>@cursor/bdk</code>. Run the published binary 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>After publication, 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="#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="#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>
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>
@@ -35,14 +35,14 @@ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON
35
35
  <span class="line"><span> [--junit &lt;path&gt;] [--artifacts &lt;dir&gt; | --no-artifacts]</span></span>
36
36
  <span class="line"><span> [--skip-report] [--out &lt;file.json&gt;] [--no-stream]</span></span>
37
37
  <span class="line"><span> [--url &lt;baseUrl&gt;] [--no-wait] [--slug &lt;slug&gt;]</span></span></code></pre></div><p>Select an exact case such as <code>weather/nyc</code>, a file prefix such as <code>weather</code>, several IDs, or no IDs for every case. Repeat <code>--tag</code> for OR matching. Projects must provide <code>evals/evals.config.{ts,js}</code> with <code>maxConcurrency</code> between 1 and 200.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--list</code></td><td>List matching cases without running them. <code>--list --json</code> prints an array.</td></tr><tr><td><code>--tag &lt;tag&gt;</code></td><td>Select a tag. Repeat the option for OR matching.</td></tr><tr><td><code>--json</code></td><td>Print <code>{ ok, passed, failed, scored, skipped, strict, results }</code>.</td></tr><tr><td><code>--verbose</code></td><td>Stream <code>t.log</code> lines and reply snippets.</td></tr><tr><td><code>--no-stream</code></td><td>Hide live progress on stderr.</td></tr><tr><td><code>--strict</code></td><td>Treat a scored case below its soft threshold as a failure.</td></tr><tr><td><code>--max-concurrency &lt;n&gt;</code></td><td>Override <code>maxConcurrency</code> from the eval config for an ephemeral local run.</td></tr><tr><td><code>--timeout-ms &lt;n&gt;</code></td><td>Override the per-case timeout. A case timeout takes precedence, followed by this option, the config timeout, and the 180-second default.</td></tr><tr><td><code>--junit &lt;path&gt;</code></td><td>Write JUnit XML for an ephemeral local run.</td></tr><tr><td><code>--artifacts &lt;dir&gt;</code></td><td>Select the artifact directory for an ephemeral local run. The default is a timestamped directory under the project&#39;s state directory.</td></tr><tr><td><code>--no-artifacts</code></td><td>Skip artifacts for an ephemeral local run.</td></tr><tr><td><code>--skip-report</code></td><td>Ignore reporters from eval files and the eval config during an ephemeral local run.</td></tr><tr><td><code>--out &lt;file.json&gt;</code></td><td>Also write the full result JSON.</td></tr><tr><td><code>--no-wait</code></td><td>Return after a running server accepts the batch.</td></tr></tbody></table><p>A running server prints its Eval ID when it accepts the batch. Use these commands to inspect or cancel it:</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 status [evalId] --url &lt;baseUrl&gt;</span></span>
38
- <span class="line"><span>bdk eval cancel &lt;evalId&gt; --url &lt;baseUrl&gt;</span></span></code></pre></div><p><code>eval status</code> without an ID lists recent remote runs. <code>eval status --out</code> requires an ID. The <code>status</code> and <code>cancel</code> subcommands require <code>--url</code>.</p><h2 id="projects" tabindex="-1">Projects <a class="header-anchor" href="#projects" aria-label="Permalink to &quot;Projects&quot;">​</a></h2><h3 id="init" tabindex="-1">Scaffold a project <a class="header-anchor" href="#init" aria-label="Permalink to &quot;Scaffold a project {#init}&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 init [directory] [--template &lt;name&gt;] [--var id=value]... [--json]</span></span></code></pre></div><p>Without a directory, <code>init</code> prints the setup guide and changes no files. With a directory, it preserves existing scaffold files, adds missing files, installs dependencies, and tries to put <code>bdk</code> on <code>PATH</code>.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--template &lt;name&gt;</code></td><td>Use a bundled template: <code>agentic-owners</code>, <code>agents-md</code>, <code>code-wiki</code>, <code>demo</code>, <code>grokbot-agents</code>, <code>security-help</code>, <code>security-reviewer</code>, <code>thermo-quality-review</code>, <code>thermo-review</code>, <code>triage-jira</code>, or <code>triage-linear</code>.</td></tr><tr><td><code>--var id=value</code></td><td>Answer a template question without a prompt. Repeat for multiple answers.</td></tr><tr><td><code>--json</code></td><td>Skip interactive login and skill prompts, then print <code>{ ok, directory, template, created, skipped, installed, installError, cliOnPath, cliLinkError, next }</code>. <code>ok</code> reflects dependency installation.</td></tr></tbody></table><p>On a TTY, templates with questions run their interview before writing files. <code>init</code> also offers to refresh the bundled coding-agent skills and starts login when the host has no Cursor credential.</p><h3 id="convert-automation" tabindex="-1">Convert an Automation <a class="header-anchor" href="#convert-automation" aria-label="Permalink to &quot;Convert an Automation {#convert-automation}&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 convert-automation &lt;url-or-uuid&gt; [--dir &lt;path&gt;] [--json]</span></span></code></pre></div><p>The input can be a Cursor Automation dashboard URL or its UUID. The output directory defaults to <code>./&lt;automation-name&gt;</code>. Generated files don&#39;t overwrite existing paths, and missing scaffold files are added. The following <code>npm install</code> can update lockfiles and run lifecycle scripts from an existing <code>package.json</code>.</p><p><code>--json</code> prints <code>{ ok, directory, files, warnings, setupSteps, installed, installError, mcpConnections }</code>. Conversion warnings and dependency-install failures remain visible in this output without failing a completed file conversion. Invalid input, authentication, export, and file-write failures exit nonzero.</p><p>See <a href="./../guides/convert-automation.html">Convert a Cursor Automation</a> for the generated project and features that need manual review.</p><h3 id="install-skills" tabindex="-1">Install coding-agent skills <a class="header-anchor" href="#install-skills" aria-label="Permalink to &quot;Install coding-agent skills {#install-skills}&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 install-skills [--print] [--json]</span></span></code></pre></div><p>The command replaces the installed BDK skills with the package copy and removes stale bundled skills. <code>--print</code> previews the change. <code>--json</code> prints <code>{ ok, dryRun, directory, firstInstall, skills, removed }</code>.</p><p>When <code>@cursor/bdk</code> publishes, package installation will perform this copy. Run <code>bdk install-skills</code> when you need to refresh it.</p><h3 id="info" tabindex="-1">Inspect a project <a class="header-anchor" href="#info" aria-label="Permalink to &quot;Inspect a project {#info}&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 info [--dir &lt;path&gt;] [--json]</span></span></code></pre></div><p>Text output lists the model, instructions, tools, skills, extensions, connections, subagents, channels, schedules, hooks, hosting settings, and diagnostics. For one unslugged project, <code>--json</code> prints its project info object. For slugged or multi-agent discovery, it prints <code>{ agents }</code>.</p><h3 id="validate" tabindex="-1">Validate a project <a class="header-anchor" href="#validate" aria-label="Permalink to &quot;Validate a project {#validate}&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 validate [--dir &lt;path&gt;]</span></span></code></pre></div><p><code>validate</code> prints every discovered project&#39;s diagnostics and exits nonzero when any diagnostic has error severity. Use it instead of <code>info --json</code> when a script needs validation status.</p><h3 id="manifest" tabindex="-1">Print a deployment manifest <a class="header-anchor" href="#manifest" aria-label="Permalink to &quot;Print a deployment manifest {#manifest}&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 manifest [--dir &lt;path&gt;] [--json]</span></span></code></pre></div><p><code>manifest</code> validates one project and prints its deployment metadata without a network request. Default output is indented JSON; <code>--json</code> prints one compact line.</p><h2 id="credentials-and-versions" tabindex="-1">Credentials and versions <a class="header-anchor" href="#credentials-and-versions" aria-label="Permalink to &quot;Credentials and versions&quot;">​</a></h2><h3 id="login-logout-whoami" tabindex="-1">Manage credentials <a class="header-anchor" href="#login-logout-whoami" aria-label="Permalink to &quot;Manage credentials {#login-logout-whoami}&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 login [--api-key &lt;key&gt;] [--key-name &lt;name&gt;]</span></span>
38
+ <span class="line"><span>bdk eval cancel &lt;evalId&gt; --url &lt;baseUrl&gt;</span></span></code></pre></div><p><code>eval status</code> without an ID lists recent remote runs. <code>eval status --out</code> requires an ID. The <code>status</code> and <code>cancel</code> subcommands require <code>--url</code>.</p><h2 id="projects" tabindex="-1">Projects <a class="header-anchor" href="#projects" aria-label="Permalink to &quot;Projects&quot;">​</a></h2><h3 id="init" tabindex="-1">Scaffold a project <a class="header-anchor" href="#init" aria-label="Permalink to &quot;Scaffold a project {#init}&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 init [directory] [--template &lt;name&gt;] [--var id=value]... [--json]</span></span></code></pre></div><p>Without a directory, <code>init</code> prints the setup guide and changes no files. With a directory, it preserves existing scaffold files, adds missing files, installs dependencies, and tries to put <code>bdk</code> on <code>PATH</code>.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--template &lt;name&gt;</code></td><td>Use a bundled template: <code>agentic-owners</code>, <code>agents-md</code>, <code>code-wiki</code>, <code>demo</code>, <code>grokbot-agents</code>, <code>security-help</code>, <code>security-reviewer</code>, <code>thermo-quality-review</code>, <code>thermo-review</code>, <code>triage-jira</code>, or <code>triage-linear</code>. <code>triage</code> selects <code>triage-linear</code>.</td></tr><tr><td><code>--var id=value</code></td><td>Answer a template question without a prompt. Repeat for multiple answers.</td></tr><tr><td><code>--json</code></td><td>Skip interactive login and skill prompts, then print <code>{ ok, directory, template, created, skipped, installed, installError, cliOnPath, cliLinkError, next }</code>. <code>ok</code> reflects dependency installation.</td></tr></tbody></table><p>On a TTY, templates with questions run their interview before writing files. <code>init</code> also offers to refresh the bundled coding-agent skills and starts login when the host has no Cursor credential.</p><h3 id="convert-automation" tabindex="-1">Convert an Automation <a class="header-anchor" href="#convert-automation" aria-label="Permalink to &quot;Convert an Automation {#convert-automation}&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 convert-automation &lt;url-or-uuid&gt; [--dir &lt;path&gt;] [--json]</span></span></code></pre></div><p>The input can be a Cursor Automation dashboard URL or its UUID. The output directory defaults to <code>./&lt;automation-name&gt;</code>. Generated files don&#39;t overwrite existing paths, and missing scaffold files are added. The following <code>npm install</code> can update lockfiles and run lifecycle scripts from an existing <code>package.json</code>.</p><p><code>--json</code> prints <code>{ ok, directory, files, warnings, setupSteps, installed, installError, mcpConnections }</code>. Conversion warnings and dependency-install failures remain visible in this output without failing a completed file conversion. Invalid input, authentication, export, and file-write failures exit nonzero.</p><p>See <a href="./../guides/convert-automation.html">Convert a Cursor Automation</a> for the generated project and features that need manual review.</p><h3 id="install-skills" tabindex="-1">Install coding-agent skills <a class="header-anchor" href="#install-skills" aria-label="Permalink to &quot;Install coding-agent skills {#install-skills}&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 install-skills [--print] [--json]</span></span></code></pre></div><p>The command replaces the installed BDK skills with the package copy and removes stale bundled skills. <code>--print</code> previews the change. <code>--json</code> prints <code>{ ok, dryRun, directory, firstInstall, skills, removed }</code>.</p><p>Package installation performs this copy. Run <code>bdk install-skills</code> when you need to refresh it.</p><h3 id="info" tabindex="-1">Inspect a project <a class="header-anchor" href="#info" aria-label="Permalink to &quot;Inspect a project {#info}&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 info [--dir &lt;path&gt;] [--json]</span></span></code></pre></div><p>Text output lists the model, instructions, tools, skills, extensions, connections, subagents, channels, schedules, hooks, hosting settings, and diagnostics. For one unslugged project, <code>--json</code> prints its project info object. For slugged or multi-agent discovery, it prints <code>{ agents }</code>.</p><h3 id="validate" tabindex="-1">Validate a project <a class="header-anchor" href="#validate" aria-label="Permalink to &quot;Validate a project {#validate}&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 validate [--dir &lt;path&gt;]</span></span></code></pre></div><p><code>validate</code> prints every discovered project&#39;s diagnostics and exits nonzero when any diagnostic has error severity. Use it instead of <code>info --json</code> when a script needs validation status.</p><h3 id="manifest" tabindex="-1">Print a deployment manifest <a class="header-anchor" href="#manifest" aria-label="Permalink to &quot;Print a deployment manifest {#manifest}&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 manifest [--dir &lt;path&gt;] [--json]</span></span></code></pre></div><p><code>manifest</code> validates one project and prints its deployment metadata without a network request. Default output is indented JSON; <code>--json</code> prints one compact line.</p><h2 id="credentials-and-versions" tabindex="-1">Credentials and versions <a class="header-anchor" href="#credentials-and-versions" aria-label="Permalink to &quot;Credentials and versions&quot;">​</a></h2><h3 id="login-logout-whoami" tabindex="-1">Manage credentials <a class="header-anchor" href="#login-logout-whoami" aria-label="Permalink to &quot;Manage credentials {#login-logout-whoami}&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 login [--api-key &lt;key&gt;] [--key-name &lt;name&gt;]</span></span>
39
39
  <span class="line"><span>bdk whoami [--json]</span></span>
40
40
  <span class="line"><span>bdk logout</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>login</code></td><td>Use a supplied API key, or open browser sign-in and store the resulting dashboard-revocable key in the CLI config directory. <code>--key-name</code> labels a browser-created key.</td></tr><tr><td><code>whoami</code></td><td>Show the active credential and its source. <code>--json</code> returns the same identity as JSON.</td></tr><tr><td><code>logout</code></td><td>Remove the stored credential file. It doesn&#39;t revoke the API key; revoke the key in the Cursor dashboard.</td></tr></tbody></table><h3 id="version" tabindex="-1">Print the version <a class="header-anchor" href="#version" aria-label="Permalink to &quot;Print the version {#version}&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 version [--json]</span></span>
41
41
  <span class="line"><span>bdk --version</span></span>
42
42
  <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>
43
43
  <span class="line"><span> [--repo &lt;https-url&gt;] [--ref &lt;git-ref&gt;] [--path &lt;agent-path&gt;]</span></span>
44
44
  <span class="line"><span> [--cursor-events-repo &lt;owner/name&gt;]...</span></span>
45
- <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> and may also include <code>applications</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. For a multi-tenant application, this cancels every install; use <code>stop --cancel-runs</code> for install-local cancellation. 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>
45
+ <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
46
  <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>
47
47
  <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
48
  <span class="line"><span> [--team &lt;id&gt;] [--from-argv] [--json]</span></span>
@@ -88,4 +88,4 @@ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON
88
88
  <span class="line"><span> [--url &lt;url&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;]</span></span>
89
89
  <span class="line"><span> [--secret &lt;secret&gt;] [--dry-run] [--out &lt;dir&gt;] [--json]</span></span>
90
90
  <span class="line"><span>bdk bitbucket events [--dir &lt;path&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;] [--json]</span></span>
91
- <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>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></ul>`,197)])])}const g=t(d,[["render",n]]);export{u as __pageData,g as default};
91
+ <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>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></ul>`,196)])])}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(c,e,r,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s("",197)])])}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("",196)])])}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><p>The <code>@cursor/bdk</code> imports and <code>bdk</code> commands on this page are docs-ahead until publication; see <a href="/docs/#bdk-package-availability">BDK package availability</a>.</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 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>
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>
@@ -17,9 +17,9 @@ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c
17
17
  <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>
18
18
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }),</span></span>
19
19
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> advertiseTools: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
20
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>The callback is evaluated on every turn, including reminder fires and post-restart follow-ups, so the identity always comes from the session itself, never from state parked in memory. The model never sees a tenant parameter and can never choose the tenant. A callback that throws fails the turn: a turn never silently runs without the connection&#39;s identity. <code>host.mcp</code> calls from server tools keep the static headers only. You can&#39;t combine <code>auth</code> with <code>oauth: true</code>; the host OAuth provider owns the Authorization header.</p><p>Derive the identity from durable session facts: <code>session.auth</code>, <code>session.id</code>, or your channel&#39;s own session state. Do not key it off <code>session.continuationKey</code>. The HTTP channel rotates that key after every accepted follow-up, so a tenant mapping keyed on it breaks mid-conversation.</p><p><code>auth</code> works attached or advertised. Advertise the auth connection instead of attaching it next to a stateful stdio server.</p><h2 id="advertise-tools" tabindex="-1">Advertise tools <a class="header-anchor" href="#advertise-tools" aria-label="Permalink to &quot;Advertise tools {#advertise-tools}&quot;">​</a></h2><p>Set <code>advertiseTools: true</code> when the model should call an MCP server&#39;s tools by name. BDK preserves each tool&#39;s description, input and output schemas, and MCP annotations. Exposed names normalize invalid characters and add numeric suffixes to avoid collisions.</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>
20
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>The callback is evaluated on every turn, including reminder fires and post-restart follow-ups, so the identity always comes from the session itself, never from state parked in memory. The model never sees a downstream account parameter and cannot choose the account. A callback that throws fails the turn: a turn never silently runs without the connection&#39;s identity. <code>host.mcp</code> calls from server tools keep the static headers only. You can&#39;t combine <code>auth</code> with <code>oauth: true</code>; the host OAuth provider owns the Authorization header.</p><p>Derive the identity from durable session facts: <code>session.auth</code>, <code>session.id</code>, or your channel&#39;s own session state. Do not key it off <code>session.continuationKey</code>. The HTTP channel rotates that key after every accepted follow-up, so an account mapping keyed on it breaks mid-conversation.</p><p><code>auth</code> works attached or advertised. Advertise the auth connection instead of attaching it next to a stateful stdio server.</p><h2 id="advertise-tools" tabindex="-1">Advertise tools <a class="header-anchor" href="#advertise-tools" aria-label="Permalink to &quot;Advertise tools {#advertise-tools}&quot;">​</a></h2><p>Set <code>advertiseTools: true</code> when the model should call an MCP server&#39;s tools by name. BDK preserves each tool&#39;s description, input and output schemas, and MCP annotations. Exposed names normalize invalid characters and add numeric suffixes to avoid collisions.</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>
21
21
  <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>
22
- <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;"> ({ headers: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">await</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> tenantHeaders</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(session) }),</span></span>
22
+ <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;"> ({ headers: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">await</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> headersForSession</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(session) }),</span></span>
23
23
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> advertiseTools: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
24
24
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Listing, authentication, invalid tool name, and name collision failures fail the turn by default. Set <code>optional: true</code> to omit an unavailable connection instead. Advertised tools behave like server tools, and <a href="./tools.html#call-a-tool-without-a-model-turn">direct tool calls</a> use the same names.</p><p>In a dry-run session, MCP tools marked read-only run normally. Tools marked as writes are stubbed. Tools without effect annotations are unavailable.</p><h2 id="filter-connection-tools" tabindex="-1">Filter connection tools <a class="header-anchor" href="#filter-connection-tools" aria-label="Permalink to &quot;Filter connection tools&quot;">​</a></h2><p>Use <code>tools</code> the same way you allowlist harness tools on the agent. When set, the connection serves only those names. Use <code>disallowedTools</code> to drop names instead. The two combine as deny-wins. The model and <code>host.mcp</code> only see what remains. A model-visible filter requires <code>advertiseTools: true</code>.</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>
25
25
  <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>
@@ -64,4 +64,4 @@ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c
64
64
  <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
65
  <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
66
  <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>`,59)])])}const E=i(n,[["render",l]]);export{c as __pageData,E as default};
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};
@@ -1 +1 @@
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("",59)])])}const E=i(n,[["render",l]]);export{c as __pageData,E as default};
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("",58)])])}const E=i(n,[["render",l]]);export{c as __pageData,E as default};
@@ -1,4 +1,4 @@
1
- import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function d(l,s,h,r,p,o){return i(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="evals" tabindex="-1">Evals <a class="header-anchor" href="#evals" aria-label="Permalink to &quot;Evals&quot;">​</a></h1><p>Evals run fixed cases against an agent and record whether its turns, tools, events, and output meet a contract. Files under the project-root <code>evals/</code> directory define cases with <code>@cursor/bdk/evals</code>; the runner discovers their IDs, executes them, and reports every assertion. See the <a href="./../evals.html">Evals guide</a> for the regression workflow.</p><p>The <code>@cursor/bdk</code> imports and <code>bdk</code> commands on this page are docs-ahead until publication; see <a href="/docs/#bdk-package-availability">BDK package availability</a>.</p><h2 id="eval-discovery-and-case-ids" tabindex="-1">Eval discovery and case IDs <a class="header-anchor" href="#eval-discovery-and-case-ids" aria-label="Permalink to &quot;Eval discovery and case IDs&quot;">​</a></h2><p>Eval files live under the project-root <code>evals/</code> directory and end in <code>.eval.ts</code> or <code>.eval.js</code>. The path under that directory becomes the eval ID:</p><ul><li><code>evals/readiness.eval.ts</code> becomes <code>readiness</code>.</li><li><code>evals/builds/api.eval.ts</code> becomes <code>builds/api</code>.</li><li><code>evals/builds/index.eval.ts</code> becomes <code>builds</code>.</li></ul><p>Export one <code>defineEval</code> with either <code>test</code> or <code>cases</code>, not both. A case ID appends one path segment to the file ID:</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;"> defineEval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
1
+ import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function d(l,s,h,r,p,o){return i(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="evals" tabindex="-1">Evals <a class="header-anchor" href="#evals" aria-label="Permalink to &quot;Evals&quot;">​</a></h1><p>Evals run fixed cases against an agent and record whether its turns, tools, events, and output meet a contract. Files under the project-root <code>evals/</code> directory define cases with <code>@cursor/bdk/evals</code>; the runner discovers their IDs, executes them, and reports every assertion. See the <a href="./../evals.html">Evals guide</a> for the regression workflow.</p><h2 id="eval-discovery-and-case-ids" tabindex="-1">Eval discovery and case IDs <a class="header-anchor" href="#eval-discovery-and-case-ids" aria-label="Permalink to &quot;Eval discovery and case IDs&quot;">​</a></h2><p>Eval files live under the project-root <code>evals/</code> directory and end in <code>.eval.ts</code> or <code>.eval.js</code>. The path under that directory becomes the eval ID:</p><ul><li><code>evals/readiness.eval.ts</code> becomes <code>readiness</code>.</li><li><code>evals/builds/api.eval.ts</code> becomes <code>builds/api</code>.</li><li><code>evals/builds/index.eval.ts</code> becomes <code>builds</code>.</li></ul><p>Export one <code>defineEval</code> with either <code>test</code> or <code>cases</code>, not both. A case ID appends one path segment to the file ID:</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;"> defineEval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
2
2
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tags: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;smoke&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
3
3
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cases: [</span></span>
4
4
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
@@ -53,4 +53,4 @@ import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k
53
53
  <span class="line"><span>bdk eval --dir . builds/checkout</span></span>
54
54
  <span class="line"><span>bdk eval --dir . --tag smoke</span></span></code></pre></div><p>ID filters match an exact ID and its descendants. Repeated IDs use OR; repeated tags use OR. When both are present, a case must match both groups.</p><h2 id="inspect-run-artifacts" tabindex="-1">Inspect run artifacts <a class="header-anchor" href="#inspect-run-artifacts" aria-label="Permalink to &quot;Inspect run artifacts&quot;">​</a></h2><p>Default run artifacts go under <code>evals/&lt;stamp&gt;/</code> in the project state directory and include <code>summary.json</code>, <code>results.jsonl</code>, and <code>evals/&lt;case-id&gt;.json</code>. <code>--artifacts &lt;dir&gt;</code> chooses another destination; <code>--no-artifacts</code> disables them. This location is independent of <code>--state-root</code>.</p><h2 id="run-evals-against-a-server" tabindex="-1">Run evals against a server <a class="header-anchor" href="#run-evals-against-a-server" aria-label="Permalink to &quot;Run evals against a server&quot;">​</a></h2><p>The playground <strong>Evals</strong> view starts batches on its running server, and <code>--url</code> targets a named running server:</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 --url http://127.0.0.1:3000/vulnerability-scanner --tag smoke</span></span>
55
55
  <span class="line"><span>bdk eval status &lt;eval-id&gt; --url http://127.0.0.1:3000/vulnerability-scanner</span></span>
56
- <span class="line"><span>bdk eval cancel &lt;eval-id&gt; --url http://127.0.0.1:3000/vulnerability-scanner</span></span></code></pre></div><p>Server-side batches use the target&#39;s discovered cases and return an eval ID for <code>status</code> or <code>cancel</code>. Local reporter and concurrency flags don&#39;t apply to <code>--url</code> runs.</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="./../evals.html">Evals guide</a></li><li><a href="./cli.html#eval">CLI reference</a></li><li><a href="./sessions.html">Sessions</a></li><li><a href="./artifacts.html">Artifacts</a></li></ul>`,61)])])}const E=e(n,[["render",d]]);export{k as __pageData,E as default};
56
+ <span class="line"><span>bdk eval cancel &lt;eval-id&gt; --url http://127.0.0.1:3000/vulnerability-scanner</span></span></code></pre></div><p>Server-side batches use the target&#39;s discovered cases and return an eval ID for <code>status</code> or <code>cancel</code>. Local reporter and concurrency flags don&#39;t apply to <code>--url</code> runs.</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="./../evals.html">Evals guide</a></li><li><a href="./cli.html#eval">CLI reference</a></li><li><a href="./sessions.html">Sessions</a></li><li><a href="./artifacts.html">Artifacts</a></li></ul>`,60)])])}const E=e(n,[["render",d]]);export{k as __pageData,E as default};
@@ -1 +1 @@
1
- import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function d(l,s,h,r,p,o){return i(),a("div",null,[...s[0]||(s[0]=[t("",61)])])}const E=e(n,[["render",d]]);export{k as __pageData,E as default};
1
+ import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function d(l,s,h,r,p,o){return i(),a("div",null,[...s[0]||(s[0]=[t("",60)])])}const E=e(n,[["render",d]]);export{k as __pageData,E as default};