@cursor/july 0.1.111 → 0.1.112

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 (383) hide show
  1. package/dist/bin/agent-serve.js +18 -1
  2. package/dist/channels/github/github-channel.d.ts +29 -19
  3. package/dist/channels/github/github-channel.d.ts.map +1 -1
  4. package/dist/channels/github/github-channel.js +29 -19
  5. package/dist/channels/slack/agentic-delivery.d.ts.map +1 -1
  6. package/dist/channels/slack/agentic-delivery.js +2 -0
  7. package/dist/channels/slack/dispatch.d.ts +11 -1
  8. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  9. package/dist/channels/slack/dispatch.js +142 -39
  10. package/dist/channels/slack/placeholder.d.ts +26 -0
  11. package/dist/channels/slack/placeholder.d.ts.map +1 -1
  12. package/dist/channels/slack/placeholder.js +28 -0
  13. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  14. package/dist/channels/slack/slack-channel.js +9 -16
  15. package/dist/docs/404.html +2 -2
  16. package/dist/docs/assets/{app.Drol6mi6.js → app.DxTdhphC.js} +4 -4
  17. package/dist/docs/assets/building-with-agents.md.BBCx0AUo.js +9 -0
  18. package/dist/docs/assets/building-with-agents.md.BBCx0AUo.lean.js +1 -0
  19. package/dist/docs/assets/chunks/@localSearchIndexroot.QmjDU6Jh.js +1 -0
  20. package/dist/docs/assets/chunks/{VPLocalSearchBox.CdqoBZJX.js → VPLocalSearchBox.CR3KTF0X.js} +1 -1
  21. package/dist/docs/assets/chunks/{arc.BVX3ycTn.js → arc.CVVqBOdS.js} +1 -1
  22. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CcChnMxX.js → architectureDiagram-Q4EWVU46.CJHGP4ki.js} +1 -1
  23. package/dist/docs/assets/chunks/{baseUniq.xwtXO-yt.js → baseUniq.r7UVVRBP.js} +1 -1
  24. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.CijZ_taK.js → blockDiagram-DXYQGD6D.DKmMaTre.js} +1 -1
  25. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.0FBvwBvK.js → c4Diagram-AHTNJAMY.DDJsntUO.js} +1 -1
  26. package/dist/docs/assets/chunks/channel.BjpoSbz_.js +1 -0
  27. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CELMmMDA.js → chunk-4BX2VUAB.BK2rKt6W.js} +1 -1
  28. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.C4bhFtSm.js → chunk-4TB4RGXK.DRLV8RnF.js} +1 -1
  29. package/dist/docs/assets/chunks/{chunk-55IACEB6.ZnQ9gRRQ.js → chunk-55IACEB6.DaKjxtb7.js} +1 -1
  30. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.DPlmglG-.js → chunk-EDXVE4YY.C5sPCIT1.js} +1 -1
  31. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.BrUk8pff.js → chunk-FMBD7UC4.CSGWyNTB.js} +1 -1
  32. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CcmWIncu.js → chunk-OYMX7WX6.D5tK9XEr.js} +1 -1
  33. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.D65-cs8I.js → chunk-QZHKN3VN.BeZGd1UZ.js} +1 -1
  34. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.qoXZpG9F.js → chunk-YZCP3GAM.U_tfWwQR.js} +1 -1
  35. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BgxOlMHw.js +1 -0
  36. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BgxOlMHw.js +1 -0
  37. package/dist/docs/assets/chunks/clone.DRuGBKZC.js +1 -0
  38. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.8rYtqudO.js → cose-bilkent-S5V4N54A.DVeRXIb6.js} +1 -1
  39. package/dist/docs/assets/chunks/{dagre-KV5264BT.DrRP1fOh.js → dagre-KV5264BT.BpKJAeRZ.js} +1 -1
  40. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DHj_xA2_.js → diagram-5BDNPKRD.BQOtrd1Z.js} +1 -1
  41. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Bz_6nAKj.js → diagram-G4DWMVQ6.CSDAhjPI.js} +1 -1
  42. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BWA0xSW9.js → diagram-MMDJMWI5.Dpztst2S.js} +1 -1
  43. package/dist/docs/assets/chunks/{diagram-TYMM5635.CpTJLNJI.js → diagram-TYMM5635.qJHRizHR.js} +1 -1
  44. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.-7AWWSrP.js → erDiagram-SMLLAGMA.vbDotH3l.js} +1 -1
  45. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BTnQ742_.js → flowDiagram-DWJPFMVM.CqS_ZQr4.js} +1 -1
  46. package/dist/docs/assets/chunks/framework.BNw1pucY.js +19 -0
  47. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.B5_HiiQ5.js → ganttDiagram-T4ZO3ILL.DTLdR4pN.js} +1 -1
  48. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CZcNTFZd.js → gitGraphDiagram-UUTBAWPF.D04lnbnr.js} +1 -1
  49. package/dist/docs/assets/chunks/{graph.V2GLaab4.js → graph.BlfqLJsM.js} +1 -1
  50. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.7pZOkCCU.js → infoDiagram-42DDH7IO.tAooImWA.js} +1 -1
  51. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DSMo3Qa3.js → ishikawaDiagram-UXIWVN3A.ClUsVqnJ.js} +1 -1
  52. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BNEgWN1S.js → journeyDiagram-VCZTEJTY.C3tUgyCg.js} +1 -1
  53. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.B-4d4tC7.js → kanban-definition-6JOO6SKY.CtD9-QCe.js} +1 -1
  54. package/dist/docs/assets/chunks/{layout.Dvbn9nSb.js → layout.D38U-LnT.js} +1 -1
  55. package/dist/docs/assets/chunks/{linear.D2GM4p4b.js → linear.BJmssyhN.js} +1 -1
  56. package/dist/docs/assets/chunks/{min.DVBtLK-B.js → min.DNgXoouU.js} +1 -1
  57. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.CnJRI55x.js → mindmap-definition-QFDTVHPH.Dcp6cxeu.js} +1 -1
  58. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.CtoaTFlA.js → pieDiagram-DEJITSTG.CLDw6zIs.js} +1 -1
  59. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DtT24_vN.js → quadrantDiagram-34T5L4WZ.CYaeeY4c.js} +1 -1
  60. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CjSO4o8f.js → requirementDiagram-MS252O5E.gMYuRpq2.js} +1 -1
  61. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.-wWiIVWa.js → sankeyDiagram-XADWPNL6.CZqyHFbc.js} +1 -1
  62. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.DSk8s4gX.js → sequenceDiagram-FGHM5R23.BTsCjUDN.js} +1 -1
  63. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.BFKAsdkN.js → stateDiagram-FHFEXIEX.CftT9mLJ.js} +1 -1
  64. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.-43J68xB.js +1 -0
  65. package/dist/docs/assets/chunks/{theme.C0MctGaz.js → theme.B_7J9ZsV.js} +2 -2
  66. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.TUNJbAFe.js → timeline-definition-GMOUNBTQ.DbU3WUNw.js} +1 -1
  67. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.C-RGNnk4.js → vennDiagram-DHZGUBPP.ixsq-q2u.js} +1 -1
  68. package/dist/docs/assets/chunks/wardley-RL74JXVD.WRXz-Dux.js +162 -0
  69. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.DH4zt73Y.js → wardleyDiagram-NUSXRM2D.C0ewvgbp.js} +1 -1
  70. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.B-3k6bF6.js → xychartDiagram-5P7HB3ND.nAEhF4bO.js} +1 -1
  71. package/dist/docs/assets/deployment.md.D2jQZuFx.js +32 -0
  72. package/dist/docs/assets/deployment.md.D2jQZuFx.lean.js +1 -0
  73. package/dist/docs/assets/evals.md.BYvfZ-PO.js +72 -0
  74. package/dist/docs/assets/evals.md.BYvfZ-PO.lean.js +1 -0
  75. package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.js +30 -0
  76. package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.lean.js +1 -0
  77. package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.js +145 -0
  78. package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.lean.js +1 -0
  79. package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.js +15 -0
  80. package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.lean.js +1 -0
  81. package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.js +43 -0
  82. package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.lean.js +1 -0
  83. package/dist/docs/assets/guides_github.md.BwpBp3ed.js +156 -0
  84. package/dist/docs/assets/guides_github.md.BwpBp3ed.lean.js +1 -0
  85. package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.js +153 -0
  86. package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.lean.js +1 -0
  87. package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.js +16 -0
  88. package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.lean.js +1 -0
  89. package/dist/docs/assets/guides_improve.md.Bnp4F99w.js +22 -0
  90. package/dist/docs/assets/guides_improve.md.Bnp4F99w.lean.js +1 -0
  91. package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.js +50 -0
  92. package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.lean.js +1 -0
  93. package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.js +35 -0
  94. package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.lean.js +1 -0
  95. package/dist/docs/assets/guides_slack.md.Bo96y42E.js +70 -0
  96. package/dist/docs/assets/guides_slack.md.Bo96y42E.lean.js +1 -0
  97. package/dist/docs/assets/guides_webhooks.md.1A72_VEE.js +92 -0
  98. package/dist/docs/assets/guides_webhooks.md.1A72_VEE.lean.js +1 -0
  99. package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.js +7 -0
  100. package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.lean.js +1 -0
  101. package/dist/docs/assets/{index.md.BFVyY2KT.js → index.md.C-t81M5J.js} +2 -2
  102. package/dist/docs/assets/{index.md.BFVyY2KT.lean.js → index.md.C-t81M5J.lean.js} +1 -1
  103. package/dist/docs/assets/{quickstart.md.D3MjSZN-.js → quickstart.md.DAvVhuuU.js} +1 -1
  104. package/dist/docs/assets/{quickstart.md.D3MjSZN-.lean.js → quickstart.md.DAvVhuuU.lean.js} +1 -1
  105. package/dist/docs/assets/{reference_agent-config.md.CfVA-LZJ.js → reference_agent-config.md.DGPyw7ms.js} +1 -1
  106. package/dist/docs/assets/{reference_agent-config.md.CfVA-LZJ.lean.js → reference_agent-config.md.DGPyw7ms.lean.js} +1 -1
  107. package/dist/docs/assets/{reference_artifacts.md.Vf7qyIZ-.js → reference_artifacts.md.Bu_4HmsD.js} +1 -1
  108. package/dist/docs/assets/{reference_artifacts.md.Vf7qyIZ-.lean.js → reference_artifacts.md.Bu_4HmsD.lean.js} +1 -1
  109. package/dist/docs/assets/{reference_channels.md.icqLKcTc.js → reference_channels.md.nFWbzAic.js} +1 -1
  110. package/dist/docs/assets/{reference_channels.md.icqLKcTc.lean.js → reference_channels.md.nFWbzAic.lean.js} +1 -1
  111. package/dist/docs/assets/{reference_cli.md.B2dBL6L8.js → reference_cli.md.DLWDz9ij.js} +3 -1
  112. package/dist/docs/assets/{reference_cli.md.B2dBL6L8.lean.js → reference_cli.md.DLWDz9ij.lean.js} +1 -1
  113. package/dist/docs/assets/{reference_connections.md.Cb3U_c8n.js → reference_connections.md.CmyrlXfY.js} +1 -1
  114. package/dist/docs/assets/{reference_connections.md.Cb3U_c8n.lean.js → reference_connections.md.CmyrlXfY.lean.js} +1 -1
  115. package/dist/docs/assets/reference_evals.md.DNJzM_yf.js +57 -0
  116. package/dist/docs/assets/reference_evals.md.DNJzM_yf.lean.js +1 -0
  117. package/dist/docs/assets/reference_extensions.md.Ceq-qT8d.js +58 -0
  118. package/dist/docs/assets/reference_extensions.md.Ceq-qT8d.lean.js +1 -0
  119. package/dist/docs/assets/{reference_hooks.md.CZuynAxj.js → reference_hooks.md.B7uzNENk.js} +2 -2
  120. package/dist/docs/assets/{reference_hooks.md.CZuynAxj.lean.js → reference_hooks.md.B7uzNENk.lean.js} +1 -1
  121. package/dist/docs/assets/{reference_http-api.md.DTKcYE6L.js → reference_http-api.md.CduHavZ2.js} +1 -1
  122. package/dist/docs/assets/{reference_http-api.md.DTKcYE6L.lean.js → reference_http-api.md.CduHavZ2.lean.js} +1 -1
  123. package/dist/docs/assets/{reference_instructions.md.D7gkckK-.js → reference_instructions.md.CU1My5My.js} +1 -1
  124. package/dist/docs/assets/{reference_instructions.md.D7gkckK-.lean.js → reference_instructions.md.CU1My5My.lean.js} +1 -1
  125. package/dist/docs/assets/{reference_playground.md.D2YExv5K.js → reference_playground.md.Ch2d0Iqi.js} +1 -1
  126. package/dist/docs/assets/{reference_playground.md.D2YExv5K.lean.js → reference_playground.md.Ch2d0Iqi.lean.js} +1 -1
  127. package/dist/docs/assets/{reference_project-layout.md.DPxbUJyt.js → reference_project-layout.md.BGhgpy9V.js} +1 -1
  128. package/dist/docs/assets/{reference_project-layout.md.DPxbUJyt.lean.js → reference_project-layout.md.BGhgpy9V.lean.js} +1 -1
  129. package/dist/docs/assets/{reference_prompt.md.BQ5uAv1F.js → reference_prompt.md.Ccp0R53H.js} +1 -1
  130. package/dist/docs/assets/{reference_prompt.md.BQ5uAv1F.lean.js → reference_prompt.md.Ccp0R53H.lean.js} +1 -1
  131. package/dist/docs/assets/{reference_schedules.md.BasfZWO-.js → reference_schedules.md.B2Nm6FaD.js} +1 -1
  132. package/dist/docs/assets/{reference_schedules.md.BasfZWO-.lean.js → reference_schedules.md.B2Nm6FaD.lean.js} +1 -1
  133. package/dist/docs/assets/{reference_sessions.md.YKvIsWAx.js → reference_sessions.md.1_6Vyv7x.js} +1 -1
  134. package/dist/docs/assets/{reference_sessions.md.YKvIsWAx.lean.js → reference_sessions.md.1_6Vyv7x.lean.js} +1 -1
  135. package/dist/docs/assets/{reference_skills.md.rNgpsGd0.js → reference_skills.md.DjQkRefx.js} +1 -1
  136. package/dist/docs/assets/{reference_skills.md.rNgpsGd0.lean.js → reference_skills.md.DjQkRefx.lean.js} +1 -1
  137. package/dist/docs/assets/{reference_subagents.md.e5qitjJt.js → reference_subagents.md.BHsSMMyO.js} +1 -1
  138. package/dist/docs/assets/{reference_subagents.md.e5qitjJt.lean.js → reference_subagents.md.BHsSMMyO.lean.js} +1 -1
  139. package/dist/docs/assets/{reference_tools.md.BdCO2aHZ.js → reference_tools.md.BYzUTeVA.js} +1 -1
  140. package/dist/docs/assets/{reference_tools.md.BdCO2aHZ.lean.js → reference_tools.md.BYzUTeVA.lean.js} +1 -1
  141. package/dist/docs/assets/{templates_agentic-owners.md.Da_AGDlH.js → templates_agentic-owners.md.9M575F5C.js} +1 -1
  142. package/dist/docs/assets/{templates_agentic-owners.md.Da_AGDlH.lean.js → templates_agentic-owners.md.9M575F5C.lean.js} +1 -1
  143. package/dist/docs/assets/{templates_pr-autofixer.md.DqxocIGh.js → templates_pr-autofixer.md.ws0DDXDy.js} +1 -1
  144. package/dist/docs/assets/{templates_pr-autofixer.md.DqxocIGh.lean.js → templates_pr-autofixer.md.ws0DDXDy.lean.js} +1 -1
  145. package/dist/docs/assets/{templates_security-reviewer.md.Bhnvd8VE.js → templates_security-reviewer.md.KEFYXzfK.js} +1 -1
  146. package/dist/docs/assets/{templates_security-reviewer.md.Bhnvd8VE.lean.js → templates_security-reviewer.md.KEFYXzfK.lean.js} +1 -1
  147. package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.js +3 -0
  148. package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.lean.js +1 -0
  149. package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.js +3 -0
  150. package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.lean.js +1 -0
  151. package/dist/docs/assets/{templates_triage.md.BdBWO9Ic.js → templates_triage.md.CVGe_FG6.js} +1 -1
  152. package/dist/docs/assets/{templates_triage.md.BdBWO9Ic.lean.js → templates_triage.md.CVGe_FG6.lean.js} +1 -1
  153. package/dist/docs/assets/troubleshooting.md.mnfFG2Em.js +1 -0
  154. package/dist/docs/assets/troubleshooting.md.mnfFG2Em.lean.js +1 -0
  155. package/dist/docs/building-with-agents.html +44 -48
  156. package/dist/docs/building-with-agents.md +94 -82
  157. package/dist/docs/deployment.html +59 -78
  158. package/dist/docs/deployment.md +117 -363
  159. package/dist/docs/evals.html +85 -224
  160. package/dist/docs/evals.md +146 -673
  161. package/dist/docs/guides/agent-to-agent.html +58 -42
  162. package/dist/docs/guides/agent-to-agent.md +112 -35
  163. package/dist/docs/guides/bitbucket.html +179 -44
  164. package/dist/docs/guides/bitbucket.md +249 -48
  165. package/dist/docs/guides/cloud-agents.html +46 -40
  166. package/dist/docs/guides/cloud-agents.md +119 -66
  167. package/dist/docs/guides/convert-automation.html +80 -49
  168. package/dist/docs/guides/convert-automation.md +156 -147
  169. package/dist/docs/guides/github.html +184 -92
  170. package/dist/docs/guides/github.md +260 -245
  171. package/dist/docs/guides/gitlab.html +184 -45
  172. package/dist/docs/guides/gitlab.md +249 -50
  173. package/dist/docs/guides/grokbot-agents.html +48 -41
  174. package/dist/docs/guides/grokbot-agents.md +99 -53
  175. package/dist/docs/guides/improve.html +48 -40
  176. package/dist/docs/guides/improve.md +111 -58
  177. package/dist/docs/guides/mcp-oauth.html +74 -52
  178. package/dist/docs/guides/mcp-oauth.md +111 -121
  179. package/dist/docs/guides/opentelemetry.html +63 -54
  180. package/dist/docs/guides/opentelemetry.md +96 -165
  181. package/dist/docs/guides/slack.html +83 -59
  182. package/dist/docs/guides/slack.md +157 -227
  183. package/dist/docs/guides/webhooks.html +97 -230
  184. package/dist/docs/guides/webhooks.md +154 -385
  185. package/dist/docs/hashmap.json +1 -1
  186. package/dist/docs/hillclimbing.html +44 -38
  187. package/dist/docs/hillclimbing.md +101 -55
  188. package/dist/docs/index.html +38 -38
  189. package/dist/docs/index.md +2 -0
  190. package/dist/docs/llms-full.txt +3082 -3104
  191. package/dist/docs/llms.txt +21 -18
  192. package/dist/docs/quickstart.html +37 -37
  193. package/dist/docs/reference/agent-config.html +37 -37
  194. package/dist/docs/reference/artifacts.html +38 -38
  195. package/dist/docs/reference/channels.html +37 -37
  196. package/dist/docs/reference/cli.html +39 -37
  197. package/dist/docs/reference/cli.md +2 -0
  198. package/dist/docs/reference/connections.html +37 -37
  199. package/dist/docs/reference/evals.html +116 -0
  200. package/dist/docs/reference/evals.md +293 -0
  201. package/dist/docs/reference/extensions.html +80 -84
  202. package/dist/docs/reference/extensions.md +127 -199
  203. package/dist/docs/reference/hooks.html +39 -39
  204. package/dist/docs/reference/hooks.md +34 -34
  205. package/dist/docs/reference/http-api.html +37 -37
  206. package/dist/docs/reference/instructions.html +37 -37
  207. package/dist/docs/reference/playground.html +37 -37
  208. package/dist/docs/reference/project-layout.html +37 -37
  209. package/dist/docs/reference/prompt.html +37 -37
  210. package/dist/docs/reference/schedules.html +37 -37
  211. package/dist/docs/reference/sessions.html +37 -37
  212. package/dist/docs/reference/skills.html +37 -37
  213. package/dist/docs/reference/subagents.html +37 -37
  214. package/dist/docs/reference/tools.html +37 -37
  215. package/dist/docs/templates/agentic-owners.html +38 -38
  216. package/dist/docs/templates/pr-autofixer.html +37 -37
  217. package/dist/docs/templates/security-reviewer.html +38 -38
  218. package/dist/docs/templates/thermo-quality-review.html +62 -0
  219. package/dist/docs/templates/thermo-quality-review.md +75 -0
  220. package/dist/docs/templates/thermo-review.html +62 -0
  221. package/dist/docs/templates/thermo-review.md +74 -0
  222. package/dist/docs/templates/triage.html +37 -37
  223. package/dist/docs/troubleshooting.html +38 -38
  224. package/dist/docs/troubleshooting.md +97 -66
  225. package/dist/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
  226. package/dist/extensions/improve/extension.d.ts +3 -1
  227. package/dist/extensions/improve/extension.d.ts.map +1 -1
  228. package/dist/extensions/improve/extension.js +4 -2
  229. package/dist/extensions/improve/skills/yourself.js +1 -1
  230. package/dist/filesystem.d.ts +46 -2
  231. package/dist/filesystem.d.ts.map +1 -1
  232. package/dist/filesystem.js +149 -102
  233. package/dist/index.d.ts +2 -2
  234. package/dist/index.d.ts.map +1 -1
  235. package/dist/index.js +1 -1
  236. package/dist/internal/cli-ax.d.ts +6 -0
  237. package/dist/internal/cli-ax.d.ts.map +1 -1
  238. package/dist/internal/cli-ax.js +72 -14
  239. package/dist/internal/continuation-identity.d.ts.map +1 -1
  240. package/dist/internal/continuation-identity.js +1 -0
  241. package/dist/internal/cursor-agent-template.d.ts +1 -1
  242. package/dist/internal/cursor-agent-template.d.ts.map +1 -1
  243. package/dist/internal/cursor-agent-template.js +2 -0
  244. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  245. package/dist/internal/filesystem/tools.js +2 -2
  246. package/dist/internal/filesystem/walk.d.ts +7 -4
  247. package/dist/internal/filesystem/walk.d.ts.map +1 -1
  248. package/dist/internal/filesystem/walk.js +34 -11
  249. package/dist/internal/hosted-admission-adapter.d.ts +3 -0
  250. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
  251. package/dist/internal/hosted-delivery-protocol.d.ts +17 -0
  252. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  253. package/dist/internal/hosted-delivery-protocol.js +50 -1
  254. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  255. package/dist/internal/hosted-delivery.js +8 -0
  256. package/dist/internal/init-project.d.ts.map +1 -1
  257. package/dist/internal/init-project.js +4 -0
  258. package/dist/internal/server.d.ts.map +1 -1
  259. package/dist/internal/server.js +94 -39
  260. package/dist/internal/session-engine.d.ts.map +1 -1
  261. package/dist/internal/session-engine.js +11 -5
  262. package/dist/internal/skill-catalog.d.ts +28 -0
  263. package/dist/internal/skill-catalog.d.ts.map +1 -0
  264. package/dist/internal/skill-catalog.js +44 -0
  265. package/dist/playground/assets/index-B1c1LeIf.js +67 -0
  266. package/dist/playground/assets/index-CK2LX3iD.css +1 -0
  267. package/dist/playground/index.html +2 -2
  268. package/dist/types.d.ts +9 -0
  269. package/dist/types.d.ts.map +1 -1
  270. package/docs/README.md +2 -0
  271. package/docs/building-with-agents.md +96 -84
  272. package/docs/deployment.md +118 -364
  273. package/docs/evals.md +147 -674
  274. package/docs/guides/agent-to-agent.md +113 -36
  275. package/docs/guides/bitbucket.md +250 -49
  276. package/docs/guides/cloud-agents.md +119 -67
  277. package/docs/guides/convert-automation.md +157 -148
  278. package/docs/guides/github.md +261 -246
  279. package/docs/guides/gitlab.md +250 -51
  280. package/docs/guides/grokbot-agents.md +100 -55
  281. package/docs/guides/improve.md +112 -59
  282. package/docs/guides/mcp-oauth.md +112 -122
  283. package/docs/guides/opentelemetry.md +97 -166
  284. package/docs/guides/slack.md +158 -228
  285. package/docs/guides/webhooks.md +155 -386
  286. package/docs/hillclimbing.md +102 -56
  287. package/docs/reference/cli.md +2 -0
  288. package/docs/reference/evals.md +298 -0
  289. package/docs/reference/extensions.md +128 -200
  290. package/docs/reference/hooks.md +34 -34
  291. package/docs/templates/thermo-quality-review.md +80 -0
  292. package/docs/templates/thermo-review.md +79 -0
  293. package/docs/troubleshooting.md +98 -67
  294. package/package.json +1 -1
  295. package/skills/github/SKILL.md +21 -13
  296. package/src/bin/agent-serve.ts +22 -0
  297. package/src/channels/github/github-channel.ts +29 -19
  298. package/src/channels/slack/agentic-delivery.ts +2 -0
  299. package/src/channels/slack/dispatch.ts +126 -4
  300. package/src/channels/slack/placeholder.ts +51 -0
  301. package/src/channels/slack/slack-channel.ts +9 -2
  302. package/src/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
  303. package/src/extensions/improve/extension.ts +4 -2
  304. package/src/extensions/improve/skills/yourself.ts +1 -1
  305. package/src/filesystem.ts +168 -65
  306. package/src/index.ts +3 -0
  307. package/src/internal/cli-ax.ts +88 -15
  308. package/src/internal/continuation-identity.ts +1 -0
  309. package/src/internal/cursor-agent-template.ts +2 -0
  310. package/src/internal/filesystem/tools.ts +2 -0
  311. package/src/internal/filesystem/walk.ts +60 -15
  312. package/src/internal/hosted-admission-adapter.ts +3 -0
  313. package/src/internal/hosted-delivery-protocol.ts +78 -1
  314. package/src/internal/hosted-delivery.ts +8 -0
  315. package/src/internal/init-project.ts +4 -0
  316. package/src/internal/server.ts +104 -41
  317. package/src/internal/session-engine.ts +16 -4
  318. package/src/internal/skill-catalog.ts +69 -0
  319. package/src/types.ts +9 -0
  320. package/templates/thermo-quality-review/README.md +35 -0
  321. package/templates/thermo-quality-review/agent/agent.ts +8 -0
  322. package/templates/thermo-quality-review/agent/channels/github.ts +42 -0
  323. package/templates/thermo-quality-review/agent/instructions.md +43 -0
  324. package/templates/thermo-quality-review/agent/tools/post_findings.ts +70 -0
  325. package/templates/thermo-quality-review/evals/evals.config.ts +5 -0
  326. package/templates/thermo-quality-review/evals/review.eval.ts +62 -0
  327. package/templates/thermo-quality-review/package.json +18 -0
  328. package/templates/thermo-quality-review/tsconfig.json +12 -0
  329. package/templates/thermo-review/README.md +35 -0
  330. package/templates/thermo-review/agent/agent.ts +8 -0
  331. package/templates/thermo-review/agent/channels/github.ts +42 -0
  332. package/templates/thermo-review/agent/instructions.md +40 -0
  333. package/templates/thermo-review/agent/tools/post_findings.ts +70 -0
  334. package/templates/thermo-review/evals/evals.config.ts +5 -0
  335. package/templates/thermo-review/evals/review.eval.ts +53 -0
  336. package/templates/thermo-review/package.json +18 -0
  337. package/templates/thermo-review/tsconfig.json +12 -0
  338. package/dist/docs/assets/building-with-agents.md.CEGVXkmO.js +0 -13
  339. package/dist/docs/assets/building-with-agents.md.CEGVXkmO.lean.js +0 -1
  340. package/dist/docs/assets/chunks/@localSearchIndexroot.DtXk1hy-.js +0 -1
  341. package/dist/docs/assets/chunks/channel.Bkv1N-gK.js +0 -1
  342. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CZDco1o8.js +0 -1
  343. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CZDco1o8.js +0 -1
  344. package/dist/docs/assets/chunks/clone.YSt_40_s.js +0 -1
  345. package/dist/docs/assets/chunks/framework.dypDpWZ3.js +0 -19
  346. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C4CLm481.js +0 -1
  347. package/dist/docs/assets/chunks/wardley-RL74JXVD.g5efOWmT.js +0 -162
  348. package/dist/docs/assets/deployment.md.Dm4Qo3hp.js +0 -51
  349. package/dist/docs/assets/deployment.md.Dm4Qo3hp.lean.js +0 -1
  350. package/dist/docs/assets/evals.md.BLDRt5LH.js +0 -211
  351. package/dist/docs/assets/evals.md.BLDRt5LH.lean.js +0 -1
  352. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.js +0 -14
  353. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.lean.js +0 -1
  354. package/dist/docs/assets/guides_bitbucket.md.CTpCl__f.js +0 -10
  355. package/dist/docs/assets/guides_bitbucket.md.CTpCl__f.lean.js +0 -1
  356. package/dist/docs/assets/guides_cloud-agents.md.lSE_l7lH.js +0 -9
  357. package/dist/docs/assets/guides_cloud-agents.md.lSE_l7lH.lean.js +0 -1
  358. package/dist/docs/assets/guides_convert-automation.md.Ck6Cr68A.js +0 -12
  359. package/dist/docs/assets/guides_convert-automation.md.Ck6Cr68A.lean.js +0 -1
  360. package/dist/docs/assets/guides_github.md.D6ER29dG.js +0 -64
  361. package/dist/docs/assets/guides_github.md.D6ER29dG.lean.js +0 -1
  362. package/dist/docs/assets/guides_gitlab.md.P-TjBnS5.js +0 -14
  363. package/dist/docs/assets/guides_gitlab.md.P-TjBnS5.lean.js +0 -1
  364. package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.js +0 -9
  365. package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.lean.js +0 -1
  366. package/dist/docs/assets/guides_improve.md.BKaDuKKK.js +0 -14
  367. package/dist/docs/assets/guides_improve.md.BKaDuKKK.lean.js +0 -1
  368. package/dist/docs/assets/guides_mcp-oauth.md.DMNMpXtO.js +0 -28
  369. package/dist/docs/assets/guides_mcp-oauth.md.DMNMpXtO.lean.js +0 -1
  370. package/dist/docs/assets/guides_opentelemetry.md._CRfDyzH.js +0 -26
  371. package/dist/docs/assets/guides_opentelemetry.md._CRfDyzH.lean.js +0 -1
  372. package/dist/docs/assets/guides_slack.md.DdT8rmsj.js +0 -46
  373. package/dist/docs/assets/guides_slack.md.DdT8rmsj.lean.js +0 -1
  374. package/dist/docs/assets/guides_webhooks.md.aQW10HRe.js +0 -225
  375. package/dist/docs/assets/guides_webhooks.md.aQW10HRe.lean.js +0 -1
  376. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.js +0 -1
  377. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.lean.js +0 -1
  378. package/dist/docs/assets/reference_extensions.md.wlFD3cUR.js +0 -62
  379. package/dist/docs/assets/reference_extensions.md.wlFD3cUR.lean.js +0 -1
  380. package/dist/docs/assets/troubleshooting.md.BcgNoYtJ.js +0 -1
  381. package/dist/docs/assets/troubleshooting.md.BcgNoYtJ.lean.js +0 -1
  382. package/dist/playground/assets/index-BLlKgZtI.css +0 -1
  383. package/dist/playground/assets/index-CDS5p9sR.js +0 -67
@@ -1,59 +1,48 @@
1
1
  ---
2
2
  title: "Agent-to-agent"
3
- description: "Wire two Agent SDK agents on one host so one can ask the other."
3
+ description: "Let one Agent SDK agent consult an independent specialist, continue its session, or call its deterministic tools."
4
4
  ---
5
5
 
6
6
  # Agent-to-agent
7
7
 
8
- Point one agent at another on the same host. The peer keeps its own
9
- session, instructions, and tools.
10
-
11
- ## Peer or subagent?
12
-
13
- Use a [subagent](../reference/subagents.md) to split one job into roles
14
- inside a single agent. Use a peer when the specialist is a full agent
15
- you would run on its own.
16
-
17
- | | Subagent (`agent/subagents/<id>/`) | Peer (`defineConnection({ agent })`) |
18
- | --- | --- | --- |
19
- | Runs as | a child of this agent | an agent on the same host |
20
- | Tools, MCP connections, sessions | the parent's | its own |
21
- | Who can reach it | only the parent | other agents, MCP clients, its playground |
8
+ A peer connection lets one agent ask another agent on the same host for
9
+ help. The specialist keeps its own instructions, tools, and session,
10
+ while the caller decides when to delegate and returns the answer to the
11
+ user.
22
12
 
23
13
  ## How do I wire two agents?
24
14
 
25
- Put both projects in one directory:
15
+ Put both projects under one directory, then point the concierge at the
16
+ specialist's mount slug. When a user asks about weather, the concierge
17
+ calls the peer's `ask` tool, the weather agent runs in its own context,
18
+ and the concierge returns that answer.
26
19
 
27
- ```
20
+ ```text
28
21
  agents/
29
22
  concierge/
30
23
  agent/instructions.md
31
24
  agent/mcp-connections/weather.ts
32
25
  weather-agent/
26
+ agent/agent.ts
33
27
  agent/instructions.md
34
28
  ```
35
29
 
36
- `weather-agent` is a normal Agent SDK project. On the concierge, add a
37
- connection. Set `agent` to the peer's slug, which is its directory
38
- name:
39
-
40
30
  ```ts
41
31
  // agents/concierge/agent/mcp-connections/weather.ts
42
32
  import { defineConnection } from "@cursor/july/connections";
43
33
 
44
34
  export default defineConnection({
45
35
  agent: "weather-agent",
46
- description: "Delegate weather questions to the weather agent.",
36
+ description: "Delegate weather questions to the weather specialist.",
47
37
  });
48
38
  ```
49
39
 
50
- The filename is the MCP server name. The concierge model sees the peer
51
- under `weather`. See
52
- [HTTP API](../reference/http-api.md#mcp-endpoint) for the MCP tools.
40
+ Give the concierge a narrow routing rule:
53
41
 
54
- In the concierge `instructions.md`, say when to ask: "When a request
55
- needs weather, ask the `weather` peer." Scope the line to the work the
56
- peer should handle. If two agents can ask each other, they will loop.
42
+ ```md
43
+ When a request needs current weather, ask the `weather` peer. Return its
44
+ answer without delegating the same request again.
45
+ ```
57
46
 
58
47
  ```bash
59
48
  agent-sdk dev ./agents
@@ -61,15 +50,103 @@ agent-sdk chat --url http://127.0.0.1:3000/concierge \
61
50
  --message "What's the weather in Paris right now?"
62
51
  ```
63
52
 
64
- Cursor-managed hosting deploys one agent per slug. Keep peers on one
65
- self-hosted process. Cloud-runtime turns need `--public-url` and
66
- `--bearer-token`. See [Deployment](../deployment.md).
53
+ The connection filename becomes the MCP server name. The `agent` value
54
+ is the specialist's mount slug, normally its directory name.
55
+
56
+ ## Continue the specialist's conversation
57
+
58
+ The first `ask` returns a peer `sessionId`. Pass that ID into the next
59
+ `ask` when the specialist should remember its earlier work instead of
60
+ starting with fresh context.
61
+
62
+ ```json
63
+ {
64
+ "message": "How does that compare with tomorrow?",
65
+ "sessionId": "<session-id>"
66
+ }
67
+ ```
68
+
69
+ The peer owns this session. Follow-ups resume its instructions and tool
70
+ history without merging them into the concierge's conversation.
71
+
72
+ ## Wait for long-running specialist work
73
+
74
+ `ask` waits for a bounded time. If the specialist is still working, it
75
+ returns `status: "running"` with the session ID, allowing the caller to
76
+ do other work and check again later.
77
+
78
+ ```json
79
+ {
80
+ "sessionId": "<session-id>",
81
+ "waitSeconds": 20
82
+ }
83
+ ```
84
+
85
+ Call the peer's `check` tool with that input. It returns the final reply
86
+ when the turn settles, or another running status when more time is
87
+ needed.
88
+
89
+ ## Call a deterministic peer tool
90
+
91
+ When the specialist has a server tool and no second model turn should
92
+ make a decision, call its `call_tool` endpoint through the peer
93
+ connection. This example runs `get_forecast` in the weather agent's
94
+ workspace and returns its structured result to the concierge tool.
95
+
96
+ ```ts
97
+ const result = await ctx.host.mcp.callTool("weather", "call_tool", {
98
+ toolName: "get_forecast",
99
+ input: { city: "Paris" },
100
+ });
101
+
102
+ return {
103
+ ok: result.isError !== true,
104
+ forecast: result.structuredContent ?? null,
105
+ };
106
+ ```
107
+
108
+ `call_tool` appears only when the peer declares at least one
109
+ deterministic server tool.
110
+
111
+ ## Peer or subagent?
112
+
113
+ Use a [subagent](../reference/subagents.md) to split one agent's job
114
+ into roles that share its project. Use a peer when the specialist is a
115
+ complete agent you would also run, inspect, or expose on its own.
116
+
117
+ | | Subagent | Peer |
118
+ | --- | --- | --- |
119
+ | Context | Child role inside one agent | Independent agent and session |
120
+ | Tools and connections | Inherits the parent project | Owns its project surface |
121
+ | Reachability | Parent only | Other co-hosted agents and MCP clients |
122
+
123
+ ## Peer sessions
124
+
125
+ Calls through `ask` create sessions on the peer's `mcp` channel. They
126
+ use the caller's authenticated principal and appear in the peer's
127
+ playground, so the same authorization boundary applies to starts,
128
+ follow-ups, and checks.
129
+
130
+ There is no automatic recursion guard between peers. Give each caller a
131
+ one-way routing rule so agent A cannot delegate the same work to B and
132
+ receive it back from B.
133
+
134
+ ## Run peers on one host
135
+
136
+ Peers require the default multi-agent layout and one shared `serve`
137
+ process. Unknown slugs and self-references fail at startup.
138
+ Cursor-managed hosting deploys one agent per slug, so use subagents
139
+ there instead of peer connections.
67
140
 
68
- Unknown slugs and self-references fail `serve` at startup. Peers need
69
- the default multi-agent layout.
141
+ For a self-hosted cloud-runtime caller, expose the shared process with
142
+ `--public-url` and protect it with `--bearer-token`. The
143
+ [Deployment guide](../deployment.md) owns that hosting setup.
70
144
 
71
- ## What's next
145
+ ## Related
72
146
 
73
- - [MCP connections](../reference/connections.md#peer-mcp-connection): `{ agent }`
147
+ - [MCP connections](../reference/connections.md#peer-mcp-connection):
148
+ peer configuration and connection naming
149
+ - [MCP endpoint](../reference/http-api.md#mcp-endpoint): exact `ask`,
150
+ `check`, and `call_tool` schemas
74
151
  - [Subagents](../reference/subagents.md): specialists inside one agent
75
- - [HTTP API](../reference/http-api.md#mcp-endpoint): `/v1/mcp`
152
+ - [Deployment](../deployment.md): secure shared-host setup
@@ -1,89 +1,290 @@
1
1
  ---
2
2
  title: "Bitbucket"
3
- description: "Wake your agent from pull requests, comments, and pushes on Bitbucket Cloud or Bitbucket Data Center."
3
+ description: "Review pull requests, answer comments, and triage pushes on Bitbucket Cloud or Data Center."
4
4
  ---
5
5
 
6
6
  # Bitbucket agents
7
7
 
8
- Use `bitbucketChannel()` for Bitbucket Cloud and Bitbucket Data Center. The
9
- channel detects the source from each signed payload and normalizes Data Center
10
- events to the Bitbucket Cloud event vocabulary.
8
+ A Bitbucket agent wakes from a verified repository event, reads the
9
+ current pull-request or commit state, and writes the result back to
10
+ Bitbucket. `bitbucketChannel()` gives the same hooks and normalized
11
+ payloads on Bitbucket Cloud and Data Center.
11
12
 
12
- ## Define the channel
13
+ ## Review a pull request
13
14
 
14
- Author `agent/channels/bitbucket.ts`:
15
+ Creating a pull request, or pushing new commits to a Data Center pull
16
+ request, starts a review. The hook reads the current diff through the
17
+ repository-bound API, the model returns a verdict, and the completed
18
+ answer appears as a comment on the pull request.
15
19
 
16
20
  ```ts
17
- import { bitbucketChannel } from "@cursor/july/channels/bitbucket";
21
+ // agent/channels/bitbucket.ts
22
+ import {
23
+ bitbucketChannel,
24
+ bitbucketChannelStateForEvent,
25
+ defaultBitbucketAuth,
26
+ } from "@cursor/july/channels/bitbucket";
27
+ import {
28
+ postPullRequestComment,
29
+ setPushTriageStatus,
30
+ } from "../lib/bitbucket.js";
18
31
 
19
- export default bitbucketChannel({});
32
+ export default bitbucketChannel({
33
+ repos: ["acme/widgets"],
34
+ onPullRequest: async (ctx, pullRequest) => {
35
+ if (pullRequest.draft) {
36
+ return null;
37
+ }
38
+ const hasNewCommits =
39
+ pullRequest.action === "updated" &&
40
+ pullRequest.previousHeadSha !== undefined &&
41
+ pullRequest.previousHeadSha !== pullRequest.headSha;
42
+ if (pullRequest.action !== "created" && !hasNewCommits) {
43
+ return null;
44
+ }
45
+
46
+ const diff = await ctx.bitbucket.api.getPullRequestDiff(pullRequest.id);
47
+ return {
48
+ // `auth` starts a model turn running as the event sender.
49
+ auth: defaultBitbucketAuth(ctx),
50
+ message: `Review ${ctx.repository.fullName}#${pullRequest.id}.`,
51
+ context: [`<bitbucket_diff>${diff}</bitbucket_diff>`],
52
+ };
53
+ },
54
+ events: {
55
+ async "message.completed"(event, channel, ctx) {
56
+ if (ctx.session.purpose === "eval") {
57
+ return;
58
+ }
59
+ if (event.data.finishReason === "tool_call" || event.data.text === "") {
60
+ return;
61
+ }
62
+ const pullRequestId = channel.state.pullRequestId;
63
+ if (
64
+ !channel.state.eventType?.startsWith("pullrequest:") ||
65
+ pullRequestId === null
66
+ ) {
67
+ return;
68
+ }
69
+ await postPullRequestComment(
70
+ channel.state,
71
+ pullRequestId,
72
+ event.data.text
73
+ );
74
+ },
75
+ },
76
+ });
20
77
  ```
21
78
 
22
- Without `onPullRequest`, new pull requests start turns. Data Center updates
23
- also start turns when the source branch has new commits. Comments and pushes
24
- are opt-in through `onPullRequestComment` and `onPush`. Use `onEvent` for
25
- other event types. Set `webhookEvents` when managed event delivery must
26
- subscribe to an event that only `onEvent` handles.
79
+ `postPullRequestComment` is a small wrapper around the normalized
80
+ Bitbucket API. Configure it with the same token and API base described
81
+ under [Connect](#connect). It takes the repository and PR ID from the
82
+ verified event state, so the model never chooses where its review is
83
+ posted.
27
84
 
28
- Filter comment hooks by author before starting a turn. This prevents comments
29
- posted by the agent from triggering another turn.
85
+ ## Answer a pull-request comment
30
86
 
31
- `ctx.bitbucket.api` can read pull requests, post comments, and create build
32
- statuses. See the [Channels reference](../reference/channels.md) for hook
33
- return values and session behavior.
87
+ Mentioning `@cursor-reviewer` in a PR comment resumes that pull
88
+ request's conversation, and the first example's reply sink posts the
89
+ answer back to the same PR. The author guard ignores comments written
90
+ by the agent, preventing each reply from starting another turn.
34
91
 
35
- ## Connect Bitbucket
92
+ ```ts
93
+ const AGENT_USERNAME = "cursor-reviewer";
36
94
 
37
- Set a repository hook secret and API token:
95
+ onPullRequestComment: (ctx, comment) => {
96
+ if (comment.author?.username === AGENT_USERNAME) {
97
+ return null;
98
+ }
99
+ if (!comment.body.includes(`@${AGENT_USERNAME}`)) {
100
+ return null;
101
+ }
102
+ return {
103
+ auth: defaultBitbucketAuth(ctx),
104
+ message: comment.body,
105
+ };
106
+ },
107
+ ```
38
108
 
39
- ```bash
40
- BITBUCKET_WEBHOOK_SECRET=...
41
- BITBUCKET_TOKEN=...
109
+ Add this property to the same `bitbucketChannel()` declaration as the
110
+ review handler.
111
+
112
+ ## Triage a push to `main`
113
+
114
+ A push to `main` immediately adds a running `cursor/push-triage` build
115
+ status to the new commit. The webhook is acknowledged while the model
116
+ investigates, then the status reports whether that triage turn
117
+ completed.
118
+
119
+ ```ts
120
+ onPush: (ctx, push) => {
121
+ const change = push.changes.find(
122
+ candidate =>
123
+ candidate.name === "main" && candidate.after !== undefined
124
+ );
125
+ if (change?.after === undefined) {
126
+ return null;
127
+ }
128
+ const sha = change.after;
129
+
130
+ return {
131
+ // `task` runs this host sequence after the webhook is acknowledged.
132
+ task: async ({ send }) => {
133
+ await ctx.bitbucket.setBuildStatus({
134
+ sha,
135
+ key: "cursor/push-triage",
136
+ state: "INPROGRESS",
137
+ name: "Cursor push triage",
138
+ description: "Investigating push to main",
139
+ });
140
+
141
+ await send(`Triage push ${sha} on ${ctx.repository.fullName}.`, {
142
+ auth: defaultBitbucketAuth(ctx),
143
+ title: `Bitbucket push ${sha}`,
144
+ state: {
145
+ ...bitbucketChannelStateForEvent({
146
+ repository: ctx.repository,
147
+ headSha: sha,
148
+ eventType: ctx.eventType,
149
+ }),
150
+ },
151
+ });
152
+ },
153
+ };
154
+ },
155
+ ```
156
+
157
+ Extend the `events` map so the turn's terminal event concludes the
158
+ status through the same provider wrapper:
159
+
160
+ ```ts
161
+ async "message.completed"(event, channel, ctx) {
162
+ if (
163
+ ctx.session.purpose !== "eval" &&
164
+ channel.state.eventType === "repo:push" &&
165
+ channel.state.headSha !== null &&
166
+ event.data.finishReason !== "tool_call"
167
+ ) {
168
+ await setPushTriageStatus(
169
+ channel.state,
170
+ "SUCCESSFUL",
171
+ "Push triage complete"
172
+ );
173
+ return;
174
+ }
175
+
176
+ // Continue with the pull-request reply branch from the first example.
177
+ },
178
+ async "turn.failed"(_event, channel, ctx) {
179
+ if (
180
+ ctx.session.purpose === "eval" ||
181
+ channel.state.eventType !== "repo:push" ||
182
+ channel.state.headSha === null
183
+ ) {
184
+ return;
185
+ }
186
+ await setPushTriageStatus(
187
+ channel.state,
188
+ "FAILED",
189
+ "Push triage failed"
190
+ );
191
+ },
42
192
  ```
43
193
 
44
- Add a repository webhook for
45
- `https://<your-host>/<slug>/v1/channels/bitbucket`. Use the same secret on
46
- both sides. The channel verifies the `X-Hub-Signature` HMAC before it parses
47
- the payload.
194
+ This status reports the triage run, not the health of the pushed commit
195
+ itself.
196
+
197
+ ## Events
198
+
199
+ Use `onPullRequest`, `onPullRequestComment`, or `onPush` for the events
200
+ shown above. Each hook returns one of three decisions:
201
+
202
+ | Return | What happens |
203
+ | --- | --- |
204
+ | `{ auth }` | Start a model turn as the Bitbucket event sender |
205
+ | `{ task }` | Acknowledge the webhook, then run host code that may also call `send` |
206
+ | `null` | Skip the event |
207
+
208
+ The [Channels reference](../reference/channels.md) covers the remaining
209
+ hook and session behavior.
48
210
 
49
- Bitbucket Cloud uses its 2.0 API by default. Data Center also needs its REST
50
- API base:
211
+ ## Pull-request affinity
212
+
213
+ Every pull-request event and comment for the same repository and PR ID
214
+ resumes one agent session. A new PR, later commits, and a mention in the
215
+ discussion therefore share the same conversation across both Bitbucket
216
+ dialects.
217
+
218
+ ## Call Bitbucket through `ctx.bitbucket`
219
+
220
+ Each hook receives an API client already bound to the repository and
221
+ dialect from the verified delivery. Use `ctx.bitbucket.api` for
222
+ pull-request reads and comments, `setBuildStatus()` for one status
223
+ update, or `createCheck()` when a status changes throughout longer
224
+ work.
225
+
226
+ The repository does not come from model output. Keep API calls on this
227
+ bound client so the event decides where reads and writes go.
228
+
229
+ ## Connect
230
+
231
+ On Cursor-managed hosting, use the signed-in Cursor account and list
232
+ the repositories that may wake the agent:
233
+
234
+ ```ts
235
+ export default bitbucketChannel({
236
+ cursorAccount: {
237
+ repos: ["acme/widgets"],
238
+ },
239
+ });
240
+ ```
241
+
242
+ `cursorAccount` covers event delivery and API calls made through
243
+ `ctx.bitbucket` inside hooks. The `postPullRequestComment` and
244
+ `setPushTriageStatus` wrappers are separate REST clients, so configure
245
+ their Bitbucket API credential too.
246
+
247
+ For direct webhooks, configure the repository hook secret, API token,
248
+ and allowed repositories. Data Center also needs its REST API base:
51
249
 
52
250
  ```ts
53
251
  export default bitbucketChannel({
54
- apiBaseUrl: "https://bitbucket.example.com/rest/api/1.0",
55
252
  repos: ["PLATFORM/api"],
253
+ webhookSecret: () => process.env.BITBUCKET_WEBHOOK_SECRET,
254
+ token: () => process.env.BITBUCKET_TOKEN ?? "",
255
+ apiBaseUrl: "https://bitbucket.example.com/rest/api/1.0",
56
256
  });
57
257
  ```
58
258
 
59
- You can set `BITBUCKET_API_BASE_URL` instead.
259
+ Without `webhookSecret`, the direct production route stays
260
+ loopback-only. Setting it admits deliveries signed with the matching
261
+ repository-hook secret; `token` authorizes the API reads and writes in
262
+ the examples.
263
+
264
+ Register the repository webhook at
265
+ `https://<your-host>/<slug>/v1/channels/bitbucket` with the same secret.
266
+ For Bitbucket Cloud, omit `apiBaseUrl`.
60
267
 
61
268
  ## Test locally
62
269
 
63
- Start the agent, then replay a pull request you can read:
270
+ Replay lets you exercise the same hooks with a pull request you can
271
+ read before registering a live repository webhook.
64
272
 
65
273
  ```bash
66
274
  agent-sdk dev
67
275
  agent-sdk bitbucket replay \
68
- https://bitbucket.example.com/projects/PLATFORM/repos/api/pull-requests/42
69
- ```
70
-
71
- Replay supports Bitbucket Cloud and Data Center URLs. `BITBUCKET_TOKEN` needs
72
- pull request read access. The command reads the pull request, creates a payload
73
- in the matching dialect, and sends it through the same channel route. Use
74
- `--events '*'` to replay the supported events declared by the channel. Use
75
- `--dry-run --out fixtures/bitbucket` to save fixtures.
76
-
77
- ```bash
78
- agent-sdk bitbucket events --dir .
79
- agent-sdk bitbucket forward --dir .
276
+ https://bitbucket.example.com/projects/PLATFORM/repos/api/pull-requests/42 \
277
+ --events '*'
80
278
  ```
81
279
 
82
- `forward` prints the repository-hook and HTTPS tunnel setup for live
83
- deliveries.
280
+ Use `--dry-run --out fixtures/bitbucket` to save the payloads instead of
281
+ posting them. `BITBUCKET_TOKEN` needs read access to the pull request.
84
282
 
85
283
  ## Related
86
284
 
87
- - [Channels reference](../reference/channels.md)
88
- - [Webhooks and custom channels](./webhooks.md)
89
- - [Evals](../evals.md)
285
+ - [Channels reference](../reference/channels.md): channel hooks,
286
+ dispatch decisions, and session behavior
287
+ - [Webhooks and custom channels](./webhooks.md): direct webhook auth
288
+ and reply delivery
289
+ - [Evals](../evals.md): turn saved Bitbucket payloads into regression
290
+ fixtures